Commit Graph

8 Commits

Author SHA1 Message Date
Gleb Natapov
466acedcb2 timer: cancel all timers during reactor destruction
If a timer is not canceled it will try to cancel itself during
destruction which may happen after engine is already destroyed.
2014-12-25 09:14:42 +02:00
Asias He
f1e46791f5 timer: Drop unused ulong_bits 2014-12-15 19:39:33 +08:00
Asias He
db0124ef05 timer: Add now() for timer_set 2014-12-15 19:39:33 +08:00
Asias He
0242d402b7 timer: Drop Clock template parameter in time_set 2014-12-15 19:39:33 +08:00
Calle Wilund
4b4f33c1ba collectd: add a few counters to reactor
Might be slightly useful for monitoring, and might also serve as an
example.

Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
2014-10-29 19:23:42 +02:00
Gleb Natapov
544a990f80 timer_set: fix expired time cancellation
Expired timer cancellation is broken since timer_set assumes that a
timer that is being canceled is not expired yet. This patch fixes the
problem by moving expired timers management outside timer_set and
letting the code that uses it to managed cancellation of expired timers.
In memcached it can never happen, in core each queued timer gets expired
flag that tells if timer is queued in a timer set or in expired timer
list.
2014-10-22 18:27:00 +03: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
Avi Kivity
105015b552 Import timer wheel code from OSv 2014-09-01 13:01:06 +03:00