Skip to content

Timer vs Unblocking Race Simplification

Move the responsibility of figuring out who won the resume race to after Fibre resumption.


  • Since resume may now be called more than once, changed the runState logic to ensure that resume() is idempotent.
  • To avoid iterator invalidation issues if "erase" is called after the timer fires, change the timer queue to store BaseTimer pointers
  • TimerQueue::erase() now blocks if the timer is currently firing to avoid segfault issues.
  • Use doubly linked list (intrusive) instead of std::list for fireList so that timers can be erased from it

Merge request reports