Queue Mixins

lifoq_mixin module

Submit tasks and Send Signals using Lifo Q.

class aio_parallel_tools.aio_task_pool.core.mixins.queue_mixin.lifoq_mixin.LifoQMixin(queue: Optional[asyncio.queues.Queue] = None, queue_maxsize: int = 0)[源代码]

基类:object

Submit tasks and Send Signals using Lifo Q.

依赖

loop (Property): Event loop.

提供

queue(Property): Event loop.

waiting_tasks_number(Property): Task size in queue.

max_tasks_number(Property): Queue's max size.

make_message (Method): Make task to message.

make_close_signal (Method): Make worker colse signal.

parser_message (Method): Parser messages from queue.

make_close_signal()[源代码]

Make close signal to send.

make_message(task: aio_parallel_tools.aio_task_pool.core.task.Task, **kwargs)[源代码]

Make task message to send.

property max_tasks_number

Maximum number of the waiting tasks.

返回

The maximum number of the waiting tasks.

返回类型

int

parser_message(message: Any) → Any[源代码]

Parser messages from queue.

property queue

Queue for sending and receiving tasks.

property waiting_tasks_number

Now number of the waiting tasks.

返回

The number of the waiting tasks.

返回类型

int

priorityq_mixin module

Submit tasks and Send Signals using Priority Q.

class aio_parallel_tools.aio_task_pool.core.mixins.queue_mixin.priorityq_mixin.PriorityQMixin(queue: Optional[asyncio.queues.Queue] = None, queue_maxsize: int = 0)[源代码]

基类:object

Submit tasks and Send Signals using Priority Q.

依赖

loop (Property): event loop.

提供

queue(Property): Event loop.

waiting_tasks_number(Property): Task size in queue.

max_tasks_number(Property): Queue's max size.

make_message (Method): Make task to message.

make_close_signal (Method): Make worker colse signal.

parser_message (Method): Parser messages from queue.

make_close_signal()[源代码]

Make close signal to send.

make_message(task: aio_parallel_tools.aio_task_pool.core.task.Task, **kwargs)[源代码]

Make task message to send.

property max_tasks_number

Maximum number of the waiting tasks.

返回

The maximum number of the waiting tasks.

返回类型

int

parser_message(message: aio_parallel_tools.aio_task_pool.core.mixins.queue_mixin.priorityq_mixin.PriorityTask) → Any[源代码]

Parser messages from queue.

property queue

Queue for sending and receiving tasks.

property waiting_tasks_number

Now number of the waiting tasks.

返回

The number of the waiting tasks.

返回类型

int

class aio_parallel_tools.aio_task_pool.core.mixins.queue_mixin.priorityq_mixin.PriorityTask(weight: int, task: Any)[源代码]

基类:object

Priority Task Message.

simpleq_mixin module

Submit tasks and Send Signals using simple Q.

class aio_parallel_tools.aio_task_pool.core.mixins.queue_mixin.simpleq_mixin.SimpleQMixin(queue: Optional[asyncio.queues.Queue] = None, queue_maxsize: int = 0)[源代码]

基类:object

Submit tasks and Send Signals using simple Q.

依赖

loop (Property): Event loop.

提供

queue(Property): Event loop.

waiting_tasks_number(Property): Task size in queue.

max_tasks_number(Property): Queue's max size.

make_message (Method): Make task to message.

make_close_signal (Method): Make worker colse signal.

parser_message (Method): Parser messages from queue.

make_close_signal()[源代码]

Make close signal to send.

make_message(task: aio_parallel_tools.aio_task_pool.core.task.Task, **kwargs)[源代码]

Make task message to send.

property max_tasks_number

Maximum number of the waiting tasks.

返回

The maximum number of the waiting tasks.

返回类型

int

parser_message(message: Any) → Any[源代码]

Parser messages from queue.

property queue

Queue for sending and receiving tasks.

property waiting_tasks_number

Now number of the waiting tasks.

返回

The number of the waiting tasks.

返回类型

int