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