proxy.core.work.local module#

proxy.py#

⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging.

copyright
  1. 2013-present by Abhinav Singh and contributors.

license

BSD, see LICENSE for more details.

class proxy.core.work.local.BaseLocalExecutor(*args: Any, **kwargs: Any)[source]#

Bases: proxy.core.work.threadless.Threadless[proxy.common.backports.NonBlockingQueue]

A threadless executor implementation which uses a queue to receive new work.

_abc_impl = <_abc._abc_data object>#
_loop: Optional[asyncio.AbstractEventLoop]#
_total: int#
_upstream_conn_filenos: Set[int]#
_upstream_conn_pool: Optional['UpstreamConnectionPool']#
cleanup_inactive_timeout: float#
property loop: Optional[asyncio.events.AbstractEventLoop]#
receive_from_work_queue() bool[source]#

Work queue is ready to receive new work.

Receive it and call work_on_tcp_conn.

Return True to tear down the loop.

registered_events_by_work_ids: Dict[int, SelectableEvents]#
selector: Optional[selectors.DefaultSelector]#
unfinished: Set['asyncio.Task[bool]']#
wait_timeout: float#
work_queue_fileno() Optional[int][source]#

If work queue must be selected before calling receive_from_work_queue then implementation must return work queue fd.

works: Dict[int, 'Work[Any]']#