libfoedus-core
FOEDUS Core Library
|
A one-time single-producer multiple-consumer event synchronization in shared memory for multiple processes. More...
A one-time single-producer multiple-consumer event synchronization in shared memory for multiple processes.
Analogous to SharedMutex. This is a shared version of foedus::thread::Rendezvous.
Definition at line 34 of file shared_rendezvous.hpp.
#include <shared_rendezvous.hpp>
Public Member Functions | |
SharedRendezvous () | |
~SharedRendezvous () | |
SharedRendezvous (const SharedRendezvous &)=delete | |
SharedRendezvous & | operator= (const SharedRendezvous &)=delete |
void | initialize () |
void | uninitialize () |
bool | is_initialized () const |
bool | is_signaled () const |
returns whether the even has signaled. More... | |
bool | is_signaled_weak () const |
weak version without fence. More... | |
void | wait () |
Block until the event happens. More... | |
bool | wait_for (uint64_t timeout_nanosec) |
Block until the event happens or the given period elapses. More... | |
void | signal () |
Notify all waiters that the event has happened. More... | |
|
inline |
Definition at line 36 of file shared_rendezvous.hpp.
References initialize().
|
inline |
Definition at line 37 of file shared_rendezvous.hpp.
References uninitialize().
|
delete |
void foedus::soc::SharedRendezvous::initialize | ( | ) |
Definition at line 27 of file shared_rendezvous.cpp.
References foedus::soc::SharedPolling::initialize(), and uninitialize().
Referenced by SharedRendezvous().
|
inline |
Definition at line 45 of file shared_rendezvous.hpp.
Referenced by uninitialize().
|
inline |
returns whether the even has signaled.
Definition at line 48 of file shared_rendezvous.hpp.
References foedus::assorted::memory_fence_acquire().
Referenced by wait(), and wait_for().
|
inline |
weak version without fence.
Definition at line 53 of file shared_rendezvous.hpp.
Referenced by wait(), and wait_for().
|
delete |
void foedus::soc::SharedRendezvous::signal | ( | ) |
Notify all waiters that the event has happened.
There must be only one thread that might call this method, and it should call this only once. Otherwise, the behavior is undefined.
Definition at line 67 of file shared_rendezvous.cpp.
References foedus::soc::SharedPolling::signal().
void foedus::soc::SharedRendezvous::uninitialize | ( | ) |
Definition at line 34 of file shared_rendezvous.cpp.
References is_initialized().
Referenced by initialize(), and ~SharedRendezvous().
void foedus::soc::SharedRendezvous::wait | ( | ) |
Block until the event happens.
Definition at line 40 of file shared_rendezvous.cpp.
References foedus::soc::SharedPolling::acquire_ticket(), ASSERT_ND, is_signaled(), is_signaled_weak(), and foedus::soc::SharedPolling::wait().
bool foedus::soc::SharedRendezvous::wait_for | ( | uint64_t | timeout_nanosec | ) |
Block until the event happens or the given period elapses.
Definition at line 53 of file shared_rendezvous.cpp.
References foedus::soc::SharedPolling::acquire_ticket(), ASSERT_ND, is_signaled(), is_signaled_weak(), and foedus::soc::SharedPolling::timedwait().