Base module
Runnable
Abstract interface for classes that can be run and cancelled.
Runnable
#include <icy/interface.h>Subclassed by:
RunnableQueue< IPacket >,RunnableQueue< PacketT >,PlanarAudioPacket >,RunnableQueue< VisionFramePacket >,AsyncDiagnostic,AsyncLogWriter,RunnableQueue< T >,Task,TaskRunner,MediaCapture,InstallTask
Abstract interface for classes that can be run and cancelled.
Public Methods
| Return | Name | Description |
|---|---|---|
Runnable inline | ||
void | run | The run method will be called by the asynchronous context. |
void | cancel virtual inline | Cancel the current task. The run() method should return ASAP. |
bool | cancelled virtual const inline | Returns true when the task has been cancelled. |
Runnable
inline
inline Runnable()run
void run()The run method will be called by the asynchronous context.
cancel
virtual inline
virtual inline void cancel(bool flag)Cancel the current task. The run() method should return ASAP.
cancelled
virtual const inline
virtual inline bool cancelled() constReturns true when the task has been cancelled.
Protected Attributes
| Return | Name | Description |
|---|---|---|
std::atomic< bool > | exit |
exit
std::atomic< bool > exit