class
SchedulerTicket
Tickets allow you to schedule sequential execution of tasks.
Tickets are retrieved from the SchedulerTicketQueue, and can be in three states: Waiting, Called and Done.
First ticket taken from the queue will be in Called state. Any subsequent tickets will be in Waiting state. Once we call Done() on the ticket, the ticket is sent to Done state, and next ticket in line is moved from Waiting to Called state.
Each ticket can have an associated callback, which will trigger when a ticket is Called.
Public
Constructors
SchedulerTicket
SchedulerTicket
SchedulerTicket
Methods
WaitUntilCalled
Blocks calling code until the ticket is out of the Waiting state.
TransitionToDoneState
Moves the ticket into Done state.
Should only be called on tickets that have been Called.
DoWhenCalled
Registers a callback that will trigger when the ticket triggers.
Multiple callbacks can be registered, in which case they will trigger in the order they were registered.