• Juho Snellman's avatar
    Add a facility for limiting number of callbacks to execute in one advance() · 922496c3
    Juho Snellman authored
    - Mark wheel as in the middle of partial tick, and use a special code
      path at start of advance() to pick up where we left off.
    - ticks_to_next_event() will return 0 until the partial tick is
      finished.
    - The order of operations is such that it's safe to continue scheduling
      further events during this stage.
    - No measurable performance hit on the fast path, pretty minimal cost when the
      limit gets hit.
    922496c3
timer-wheel.h 18.1 KB