Provides an interface to facilitate 'implicit' coroutine yielding within other primitives such as mutexes and condition variables or to allow 'explicit' cooperative yielding by the user.
More...
|
virtual | ~ICoroSync ()=default |
| Default virtual destructor. More...
|
|
virtual void | setYieldHandle (Traits::Yield &yield)=0 |
| Sets the underlying boost::coroutine object so that it can be yielded on. More...
|
|
virtual Traits::Yield & | getYieldHandle ()=0 |
| Retrieve the underlying boost::coroutine object. More...
|
|
virtual void | yield ()=0 |
| Explicitly yields this coroutine context. More...
|
|
virtual std::atomic_int & | signal ()=0 |
| Accessor to the underlying synchronization variable. More...
|
|
virtual void | sleep (const std::chrono::milliseconds &timeMs)=0 |
| Sleeps the coroutine associated with this context for at least 'timeMs' milliseconds or 'timeUs' microseconds depending on the overload chosen. More...
|
|
virtual void | sleep (const std::chrono::microseconds &timeUs)=0 |
|
Provides an interface to facilitate 'implicit' coroutine yielding within other primitives such as mutexes and condition variables or to allow 'explicit' cooperative yielding by the user.
- Note
- This class is used internally and as such should not be accessed directly.