9 #ifndef CPPCOMMON_THREADS_EVENT_MANUAL_RESET_H
10 #define CPPCOMMON_THREADS_EVENT_MANUAL_RESET_H
95 Impl& impl() noexcept {
return reinterpret_cast<Impl&
>(_storage); }
96 const Impl& impl() const noexcept {
return reinterpret_cast<Impl const&
>(_storage); }
98 static const size_t StorageSize = 128;
99 static const size_t StorageAlign = 8;
100 alignas(StorageAlign) std::byte _storage[StorageSize];
Manual-reset event synchronization primitive.
bool TryWait()
Try to wait the event without block.
void Reset()
Reset the event.
EventManualReset(EventManualReset &&event)=delete
EventManualReset & operator=(const EventManualReset &)=delete
bool TryWaitFor(const Timespan ×pan)
Try to wait the event for the given timespan.
EventManualReset(const EventManualReset &)=delete
EventManualReset & operator=(EventManualReset &&event)=delete
bool TryWaitUntil(const UtcTimestamp ×tamp)
Try to wait the event until the given timestamp.
EventManualReset(bool signaled=false)
Default class constructor.
void Wait()
Try to wait the event with block.
void Signal()
Signal one of waiting thread about event occurred.
C++ Common project definitions.