Lines Matching defs:WaitableEvent

30 // A WaitableEvent can be a useful thread synchronization tool when you want to
35 // Use a WaitableEvent when you would otherwise use a Lock+ConditionVariable to
37 // WaitableEvent in conjunction with a Lock to wait for a more complex state
39 // be using a ConditionVariable instead of a WaitableEvent.
45 class BASE_API WaitableEvent {
51 WaitableEvent(bool manual_reset, bool initially_signaled);
54 // Create a WaitableEvent from an Event HANDLE which has already been
57 explicit WaitableEvent(HANDLE event_handle);
63 ~WaitableEvent();
90 // waitables: an array of WaitableEvent pointers
93 // returns: the index of a WaitableEvent which has been signaled.
95 // You MUST NOT delete any of the WaitableEvent objects while this wait is
97 static size_t WaitMany(WaitableEvent** waitables, size_t count);
108 // Consider the case of a Waiter which is in multiple WaitableEvent's
109 // wait-lists. Each WaitableEvent is automatic-reset and two of them are
117 // this case, the auto-reset WaitableEvent shouldn't act as if anything has
119 virtual bool Fire(WaitableEvent* signaling_event) = 0;
122 // two Waiters to be considered equal. In WaitableEvent::Dequeue, if the
142 // so we have a kernel of the WaitableEvent, which is reference counted.
159 typedef std::pair<WaitableEvent*, size_t> WaiterAndIndex;
161 // When dealing with arrays of WaitableEvent*, we want to sort by the address
162 // of the WaitableEvent in order to have a globally consistent locking order.
164 // second element is the index of the WaitableEvent in the original,
176 DISALLOW_COPY_AND_ASSIGN(WaitableEvent);