Thread‐safe scheduler that dispatches callbacks on a worker thread.
Synopsis
Declared in <bdlmt_eventscheduler.h>
class EventScheduler;
Description
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.
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 |
|
Increment the reference count for the recurring event |
|
Return the allocator used by this object to supply memory. |
|
Cancel all recurring and one‐time events scheduled in this EventScheduler. |
|
Cancel all events and wait for completion. |
|
|
|
|
|
Return the value of the clock type that this object was created with. |
|
Return |
|
Return |
|
Return the earliest scheduled time of any pending event. |
|
Return the current epoch time for this scheduler's clock. |
|
Return the number of pending one‐time events in this scheduler. |
|
Return the number of recurring events registered with this scheduler. |
|
|
|
Reschedule the event referred to by |
|
Reschedule |
|
|
|
Schedule |
|
|
|
Schedule a recurring event and load a raw cancel handle into |
|
|
|
|
|
Stop dispatching events on this scheduler. |
|
|
Declare that this type uses a |
Friends
Name |
Description |
Test utility that controls the clock used by an |
|
Handle referring to a recurring event in an |
|
Objects of this type refer to events in the |
Created with MrDocs