aea.helpers.async_friendly_queue

This module contains the implementation of AsyncFriendlyQueue.

AsyncFriendlyQueue Objects

class AsyncFriendlyQueue(queue.Queue)

queue.Queue with async_get method.

__init__

 | __init__(*args, **kwargs)

Init queue.

put

 | put(item: Any, *args, **kwargs) -> None

Put an item into the queue.

Arguments:

  • item: item to put in the queue :param args, kwargs: similar to queue.Queue.put

get

 | get(*args, **kwargs) -> Any

Get an item into the queue.

:param args, kwargs: similar to queue.Queue.get

async_wait

 | async async_wait() -> None

Wait an item appears in the queue.

Returns:

None

async_get

 | async async_get() -> Any

Wait and get an item from the queue.

Returns:

item from queue