13 #ifndef __PROCESS_ONCE_HPP__
14 #define __PROCESS_ONCE_HPP__
16 #include <condition_variable>
28 Once() : started(false), finished(false) {}
40 synchronized (mutex) {
57 synchronized (mutex) {
58 if (started && !finished) {
71 std::condition_variable cond;
78 #endif // __PROCESS_ONCE_HPP__
void synchronized_wait(CV *cv, Lock *lock)
Waits on the condition variable associated with 'lock' which has already been synchronized.
Result< Process > process(pid_t pid)
Definition: freebsd.hpp:30
bool once()
Definition: once.hpp:36
void done()
Definition: once.hpp:55
Once()
Definition: once.hpp:28