roar
Loading...
Searching...
No Matches
shutdown_barrier.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4
5namespace Roar
6{
12 {
13 public:
14 ShutdownBarrier() noexcept;
20
22 void release(int releasedWithWhatSignal);
23
25 int wait();
26
27 private:
28 static void installSignalHandlers();
29
30 private:
31 struct Implementation;
32 std::unique_ptr<Implementation> m_impl;
33 };
34
36}
Definition shutdown_barrier.hpp:12
std::unique_ptr< Implementation > m_impl
Definition shutdown_barrier.hpp:32
ShutdownBarrier(ShutdownBarrier const &)=delete
ShutdownBarrier & operator=(ShutdownBarrier &&)
int wait()
Waits until release is called and returns the signal.
Definition shutdown_barrier.cpp:44
void release(int releasedWithWhatSignal)
Releases the barrier and stops blocking.
Definition shutdown_barrier.cpp:34
ShutdownBarrier() noexcept
Definition shutdown_barrier.cpp:26
ShutdownBarrier & operator=(ShutdownBarrier const &)=delete
static void installSignalHandlers()
Definition shutdown_barrier.cpp:54
ShutdownBarrier(ShutdownBarrier &&)
Definition authorization.hpp:10
ShutdownBarrier shutdownBarrier
Definition shutdown_barrier.cpp:11
Definition shutdown_barrier.cpp:19