Commit Graph

5 Commits

Author SHA1 Message Date
Pekka Enberg
194cb68c8b tests: add thread-in-thread test case 2015-06-16 17:11:50 +03:00
Gleb Natapov
1b2bf57a2b move timer out of reactor.hh to its own header 2015-06-14 16:02:16 +03:00
Avi Kivity
27d9446f77 future: fix false-positive when a promise tied to a future that lost its state is destroyed
When a promise that still tracks its future is destroyed, but after
future::get() or future::then() was called, the promise thinks it was
destroyed before generating a value, and fails an assertion.

Fix be detaching the promise from the future as soon as get() or then()
remove the value.
2015-06-06 13:47:44 +03:00
Avi Kivity
3986ad6a11 thread: add seastar::async()
Following std::async(), seastar::async(func) causes func to be executed
in a seastar thread, where it can block using future<>::get().  Whatever
func returns is converted to a future, and returned as async()s return
value.
2015-06-04 20:57:00 +03:00
Avi Kivity
7a309c07f5 tests: add basic thread test 2015-05-17 15:57:11 +03:00