system.queues.list_queues module

In-memory list-backed queue implementation.

class system.queues.list_queues.ListQueue[source]

Bases: ReadWriteQueue, Iterator, Generic

ListQueue is an in-memory read-write queue that uses a list as both buffer and backing storage.

flush() → int[source]

See WriteQueue.flush().

No-op for this in-memory queue: there is no backing file to write to, so nothing is written and 0 is always returned.

insert(entry: ObjectType) → None[source]

See WriteQueue.insert().

pop() → ObjectType[source]

Pops the first element from the queue.

Returns:

The first element from the queue.

size() → int[source]

Returns the number of elements inserted into this queue so far.

Returns:

The number of elements inserted into this queue so far.

close() → None[source]

Closes the queue. Does not do anything for this implementation.