You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it might miss the expiry of a timer if that one gets registered while the loop is already blocked in wait_for_events with a longer timeout.
Therefore the only reliable way to drive a timer in a multithreaded context is currently to poll the timer in regular intervals independent of the number of registered timers.
To fix this issue GenericTimerService could provide a hook that allows to wakeup the eventloop if a new timer gets registered whose expiry data is earlier than the previously registered timer.
The text was updated successfully, but these errors were encountered:
The
next_expiration
API for theGenericTimerService
doesn't work well in a multithreaded context. If an eventloop works like:it might miss the expiry of a timer if that one gets registered while the loop is already blocked in
wait_for_events
with a longer timeout.Therefore the only reliable way to drive a timer in a multithreaded context is currently to poll the timer in regular intervals independent of the number of registered timers.
To fix this issue
GenericTimerService
could provide a hook that allows to wakeup the eventloop if a new timer gets registered whose expiry data is earlier than the previously registered timer.The text was updated successfully, but these errors were encountered: