|
Open Model Railroad Network (OpenMRN)
|
A Notifiable for synchronously waiting for a notification. More...
#include <Notifiable.hxx>
Public Member Functions | |
| SyncNotifiable () | |
| Constructor. | |
| void | notify () override |
| Implementation of notification receive. | |
| void | wait_for_notification () |
| Blocks the current thread until the notification is delivered. | |
Private Member Functions | |
| DISALLOW_COPY_AND_ASSIGN (SyncNotifiable) | |
Private Attributes | |
| OSSem | sem_ |
| Semaphore helping the implementation. | |
A Notifiable for synchronously waiting for a notification.
TODO(balazs.racz): We should make a syncnotifiable not need a semaphore of itself, but rather use a thread-local semaphore.
Definition at line 60 of file Notifiable.hxx.
|
inline |
Constructor.
Definition at line 64 of file Notifiable.hxx.
|
inlineoverridevirtual |
Implementation of notification receive.
Implements Notifiable.
Definition at line 69 of file Notifiable.hxx.
|
inline |
Blocks the current thread until the notification is delivered.
Definition at line 85 of file Notifiable.hxx.
|
private |
Semaphore helping the implementation.
Definition at line 92 of file Notifiable.hxx.