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 >, PlanarVideoPacket >, AsyncDiagnostic, AsyncLogWriter, RunnableQueue< T >, Task, TaskRunner, MediaCapture, InstallTask

Abstract interface for classes that can be run and cancelled.

Public Methods

ReturnNameDescription
Runnable inline
voidrunThe run method will be called by the asynchronous context.
voidcancel virtual inlineCancel the current task. The run() method should return ASAP.
boolcancelled virtual const inlineReturns 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() const

Returns true when the task has been cancelled.

Protected Attributes

ReturnNameDescription
std::atomic< bool >exit

exit

std::atomic< bool > exit