he SignaledBarrier has two states: Open and Closed. In Open state the member
function SignaledBarrier::waitForOpen returns immediately. In the Closed state
it blocks until the state changes to Open. The thread-safe member functions
SignaledBarrier::open and SignaledBarrier::close control the state.
The following is the public interface of SignaledBarrier:
class
SignaledBarrier : boost::noncopyable
{
public:
SignaledBarrier();
void
waitForOpen() volatile;
void
open() volatile;
void
close() volatile;
};
The Signaled barrier should be accessed via the following statements:
#include
<ots/threading/SignaledBarrier.hpp>
#include <ots/otsConfig.hpp>
typedef ots::config::SignaledBarrier::type
SignaledBarrier.
The member functions throw either ots::config::ThreadResourceError
(=boost::thread_resource_error by default ots::config setting) or
ots::ThreadInterrupted (=boost::thread_interrupted).
|