Base module

AsyncQueue

[AsyncQueue]({#ref classicy_1_1AsyncQueue #}) is a thread-based queue which receives packets from any thread source and dispatches them asynchronously.

AsyncQueue

#include <icy/queue.h>

Inherits: RunnableQueue< T > Subclassed by: AsyncPacketQueue< PacketT >, PlanarAudioPacket >, PlanarVideoPacket >, AsyncPacketQueue< T >

AsyncQueue is a thread-based queue which receives packets from any thread source and dispatches them asynchronously.

This queue is useful for deferring load from operation critical system devices before performing long running tasks.

The thread will call the RunnableQueue's run() method to constantly flush outgoing packets until cancel() is called.

Public Methods

ReturnNameDescription
AsyncQueue inline#### Parameters
voidcancel virtual inlineCancels the queue and joins the dispatch thread.

AsyncQueue

inline

inline AsyncQueue(int limit)

Parameters

  • limit Maximum number of queued items before oldest are dropped.

cancel

virtual inline

virtual inline void cancel(bool flag)

Cancels the queue and joins the dispatch thread.

Parameters

  • flag True to cancel, false to un-cancel.

Protected Attributes

ReturnNameDescription
Thread_thread

_thread

Thread _thread

Public Types

NameDescription
Queue

Queue

RunnableQueue< T > Queue()