Commit Graph

8 Commits

Author SHA1 Message Date
Avi Kivity
0aaea57838 tests: fix missing do in do/while(0) in timertest
Thanks clang.
2015-01-08 18:36:51 +02:00
Asias He
1d48610f1b tests: Improve timertest
Test both high-res and low-res clock timer.
2014-12-15 19:39:33 +08:00
Asias He
62fff15e54 timer: Make timer a template 2014-12-15 19:39:33 +08:00
Tomasz Grabiec
5f3352b7e3 tests: integrate with BOOST UTF
Asynchronous test cases can be delared using SEASTAR_TEST_CASE macro,
which is equivalent to BOOST_AUTO_TEST_CASE, but the function body is
run inside a reactor and can returns a future<> which resolves when
the test is done.
2014-10-15 15:50:28 +02:00
Tomasz Grabiec
48a86b7073 core: make timer callbacks synchronous with state changes
It allows for simpler client code because the client can assume that
when cancel() returns the callback will not run and thus there's no
need to handle the race between timer teardown and execution of the
callback.
2014-10-01 13:21:10 +02:00
Tomasz Grabiec
52ab797536 rename engine::start() to engine::when_started()
The imperative form suggests that in addition to returning a future it
performs some action and thus is needed regardless of whether we want
to add a callback or not. But in fact it does not do anything, just
gives away a future.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
2014-09-16 09:59:13 +03:00
Avi Kivity
b6d85fc6a6 s/the_reactor/engine/g
Things named "engine" are 20% faster.
2014-09-10 15:46:33 +03:00
Avi Kivity
2aa3d0a755 tests: add timer test 2014-09-01 13:01:06 +03:00