|
C++ Concurrency Sandbox
|
A thread-safe template queue used for inter-thread communication. More...
Public Member Functions | |
| void | push (T result) |
| Pushes a result into the queue and notifies the waiting thread. | |
| T | pop () |
| Blocks until a result is available and then removes it from the queue. | |
A thread-safe template queue used for inter-thread communication.
| T | The type of data being passed between threads. |
Definition at line 26 of file MessagePassing.cpp.
|
inline |
Blocks until a result is available and then removes it from the queue.
Definition at line 49 of file MessagePassing.cpp.
Referenced by main().
|
inline |
Pushes a result into the queue and notifies the waiting thread.
| result | The data object to be sent to the inbox. |
Definition at line 37 of file MessagePassing.cpp.
Referenced by IsPrimeCalculator::operator()().