7#include "wpi/util/SmallVector.hpp"
14 wpi::util::SmallVector<WPI_EventHandle, 4>
events;
22 std::scoped_lock lock{
mutex};
23 events.emplace_back(handle);
32 std::scoped_lock lock{
mutex};
33 auto it = std::find_if(
35 [=](
const WPI_EventHandle fromHandle) { return fromHandle == handle; });
45 std::scoped_lock lock{
mutex};
46 for (
auto&& handle :
events) {
WPI_Handle WPI_EventHandle
An event handle.
Definition Synchronization.h:18
Definition raw_os_ostream.hpp:19
void SetEvent(WPI_EventHandle handle)
Sets an event to signaled state.
::std::mutex mutex
Definition mutex.hpp:17
Definition EventVector.hpp:12
wpi::util::SmallVector< WPI_EventHandle, 4 > events
Definition EventVector.hpp:14
void Add(WPI_EventHandle handle)
Adds an event to the event vector.
Definition EventVector.hpp:21
void Wakeup()
Wakes up all events in the event vector.
Definition EventVector.hpp:44
void Remove(WPI_EventHandle handle)
Removes an event from the event vector.
Definition EventVector.hpp:31
wpi::util::mutex mutex
Definition EventVector.hpp:13