Skip to content

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: Any, **kwargs: Any) -> None

Init queue.

put

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

Put an item into the queue.

Arguments:

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

get

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

Get an item into the queue.

Arguments:

  • args: similar to queue.Queue.get
  • kwargs: similar to queue.Queue.get

Returns:

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

Back to top