process-cpp
3.0.0
A simple convenience library for handling processes in C++11.
|
A cross-process synchronization primitive that supports simple wait-condition-like scenarios. More...
#include <cross_process_sync.h>
Classes | |
struct | Error |
Public Member Functions | |
CrossProcessSync () | |
Constructs a new sync element. More... | |
CrossProcessSync (const CrossProcessSync &rhs) | |
Copy c'tor, duping the underlying fds. More... | |
~CrossProcessSync () noexcept | |
Closes the underlying fds. More... | |
CrossProcessSync & | operator= (const CrossProcessSync &rhs) |
operator =, dup's the underlying fds. More... | |
void | try_signal_ready_for (const std::chrono::milliseconds &duration) |
Try to signal the other side that we are ready for at most duration milliseconds. More... | |
std::uint32_t | wait_for_signal_ready_for (const std::chrono::milliseconds &duration) |
Wait for the other sides to signal readiness for at most duration milliseconds. More... | |
A cross-process synchronization primitive that supports simple wait-condition-like scenarios.
Definition at line 36 of file cross_process_sync.h.
core::testing::CrossProcessSync::CrossProcessSync | ( | ) |
Constructs a new sync element.
Definition at line 32 of file cross_process_sync.cpp.
core::testing::CrossProcessSync::CrossProcessSync | ( | const CrossProcessSync & | rhs | ) |
Copy c'tor, duping the underlying fds.
rhs | The instance to copy. |
Definition at line 38 of file cross_process_sync.cpp.
|
noexcept |
Closes the underlying fds.
Definition at line 44 of file cross_process_sync.cpp.
core::testing::CrossProcessSync & core::testing::CrossProcessSync::operator= | ( | const CrossProcessSync & | rhs | ) |
operator =, dup's the underlying fds.
rhs | The instance to assign from. |
Definition at line 50 of file cross_process_sync.cpp.
void core::testing::CrossProcessSync::try_signal_ready_for | ( | const std::chrono::milliseconds & | duration | ) |
Try to signal the other side that we are ready for at most duration milliseconds.
Error::Timeout | in case of a timeout. |
std::system_error | for problems with the underlying pipe. |
Definition at line 62 of file cross_process_sync.cpp.
Referenced by TEST().
std::uint32_t core::testing::CrossProcessSync::wait_for_signal_ready_for | ( | const std::chrono::milliseconds & | duration | ) |
Wait for the other sides to signal readiness for at most duration milliseconds.
Error::Timeout | in case of a timeout. |
std::system_error | for problems with the underlying pipe. |
Definition at line 78 of file cross_process_sync.cpp.
Referenced by TEST().