This class provides a thread‐safe event scheduler that executes callbacks in a separate "dispatcher thread." start must be invoked to start dispatching the callbacks. stop pauses the dispatching of the callbacks without removing the pending events.
Synopsis
Declared in <bdlmt_eventscheduler.h>
class EventScheduler;
Types
Name |
Description |
Opaque structure identifying a non‐recurring event; pointers are populated by the "Raw" API of |
|
Opaque structure identifying a recurring event; pointers are populated by the "Raw" API of |
Type Aliases
Name |
Description |
Defines a type alias for the dispatcher functor type. |
|
Defines a type alias for a handle managing a non‐recurring event. |
|
Defines a type alias for a handle managing a recurring event. |
Member Functions
Name |
Description |
|
Constructors |
|
Discard all unprocessed events and destroy this object. The behavior is undefined unless the scheduler is stopped. |
Increment the reference count for the event referred to by the specified |
|
Increment the reference count for the recurring event referred to by the specified |
|
Return the allocator used by this object to supply memory. |
|
Cancel all recurring and one‐time events scheduled in this EventScheduler. |
|
Cancel all recurring and one‐time events scheduled in this EventScheduler. Block until all events have either been cancelled or dispatched before this call returns. The behavior is undefined if this method is invoked from the dispatcher thread. |
|
|
|
|
|
Return the value of the clock type that this object was created with. |
|
Return |
|
Return |
|
Return the earliest scheduled starting time of the pending events and recurring events registered with this scheduler. If there are no pending events or recurring events, return |
|
Return the current epoch time, an absolute time represented as an interval from some epoch, which is determined by the clock indicated at construction (see {Supported Clock Types} in the component documentation). |
|
Return the number of pending one‐time events in this scheduler. |
|
Return the number of recurring events registered with this scheduler. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Return the scheduled starting time of the event having the specified |
|
|
|
End the dispatching of events on this scheduler (but do not remove any pending events), and wait for any (one) currently executing event to complete. If the scheduler is already stopped then this method has no effect. This scheduler can be restarted by invoking |
|
|
Declare that this type uses a |
Friends
Name |
Description |
This class provides a means to change the clock that is used by a given event‐scheduler to determine when events should be triggered. Constructing a |
|
Objects of this type refer to recurring events in the |
|
Objects of this type refer to events in the |
Created with MrDocs