Base class for the ThreadRelay::Relay0,1,2,3 templates for storing in a list.
More...
#include <ThreadRelay.h>
|
| RelayBase (ThreadRelay &tr) |
| Constructor.
|
|
virtual | ~RelayBase ()=default |
| Default virtual destructor.
|
|
virtual void | call ()=0 |
| Pure virtual function to override in the derived template class to call a method.
|
|
| operator bool () |
| Blocks the thread when the thread id is different then the thread which created the ThreadRelay instance.
|
|
|
std::atomic< bool > | _sentry {false} |
| Prevents the execution of the method more the once.
|
|
ThreadRelay & | _tr |
| Prevents the execution of the method more the once.
|
|
Semaphore | _semaphore |
| Holds the semaphore to stop the thread until the method is executed.
|
|
friend | ThreadRelay |
|
Base class for the ThreadRelay::Relay0,1,2,3 templates for storing in a list.
◆ RelayBase()
sf::ThreadRelay::RelayBase::RelayBase |
( |
ThreadRelay & |
tr | ) |
|
|
inlineexplicit |
◆ ~RelayBase()
virtual sf::ThreadRelay::RelayBase::~RelayBase |
( |
| ) |
|
|
virtualdefault |
Default virtual destructor.
◆ call()
virtual void sf::ThreadRelay::RelayBase::call |
( |
| ) |
|
|
pure virtual |
Pure virtual function to override in the derived template class to call a method.
◆ operator bool()
sf::ThreadRelay::RelayBase::operator bool |
( |
| ) |
|
|
explicit |
Blocks the thread when the thread id is different then the thread which created the ThreadRelay instance.
- Returns
- True when acquired.
◆ _semaphore
Semaphore sf::ThreadRelay::RelayBase::_semaphore |
|
protected |
Holds the semaphore to stop the thread until the method is executed.
◆ _sentry
std::atomic<bool> sf::ThreadRelay::RelayBase::_sentry {false} |
|
protected |
Prevents the execution of the method more the once.
◆ _tr
Prevents the execution of the method more the once.
◆ ThreadRelay
friend sf::ThreadRelay::RelayBase::ThreadRelay |
|
protected |
The documentation for this class was generated from the following file: