Module Expr Str Import alias Import alias Import alias Import alias TryExcept body Import alias handlers ExceptHandler type NameLoad body Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases AttributeLoad NameLoad attr body Expr Str ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Pass decorator_list Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Num FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad Call NameLoad NameLoad keyword NameLoad Index Num Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If BoolOpOr UnaryOpNot NameLoad CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Assign NameStore BoolOpOr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Str TryExcept body Assign NameStore Call NameLoad BoolOpOr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Num handlers ExceptHandler type NameLoad body Raise Call AttributeLoad NameLoad attr Str Return TupleLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults Str kwarg body With AttributeLoad NameLoad attr body If AttributeLoad NameLoad attr body If CompareNotEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Raise Call NameLoad Str orelse Assign AttributeStore NameLoad attr Call NameLoad keyword NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assert Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore BoolOpOr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad keyword NameLoad decorator_list decorator_list Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return CompareIn NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad While AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body TryExcept body Return Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call AttributeLoad NameLoad attr BinOpMod Str NameLoad ExceptHandler type NameLoad body Raise Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults vararg body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults vararg body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body With AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BoolOpOr NameLoad Lambda arguments args NameParam defaults NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad With AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list Assign NameStore NameLoad With AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad If UnaryOpNot NameLoad body Assign NameStore NameLoad If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return If UnaryOpNot NameLoad body Return Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num If UnaryOpNot NameLoad body Raise Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad If Call AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body For TupleStore NameStore NameStore Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr body If CompareEq NameLoad NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad BoolOpOr NameLoad Str Return orelse Pass Assign NameStore Call NameLoad NameLoad NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call NameLoad NameLoad NameLoad NameLoad decorator_list Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Continue decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr FunctionDef arguments args defaults body Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad decorator_list If Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A Context controls the routing and handling of messages between processes. N/A logging N/A socket N/A threading N/A os N/A N/A N/A asyncio N/A N/A N/A ImportError N/A N/A trollius asyncio collections defaultdict functools partial httpd HTTPD request encode_request tornado stack_context tornado.iostream IOStream tornado.netutil bind_sockets tornado.platform.asyncio BaseAsyncIOLoop N/A log N/A N/A logging getLogger __name__ Context N/A N/A threading Thread N/A N/A A compactor context.

  Compactor contexts control the routing and handling of messages between
  processes.  At its most basic level, a context is a listening (ip, port)
  pair and an event loop.
   Error N/A Exception N/A N/A N/A SocketError N/A Error N/A N/A N/A InvalidProcess N/A Error N/A N/A N/A InvalidMethod N/A Error N/A N/A N/A N/A _SINGLETON None N/A _LOCK N/A N/A threading Lock N/A CONNECT_TIMEOUT_SECS 5 _make_socket N/A N/A cls ip port N/A N/A N/A Bind to a new socket.

    If LIBPROCESS_PORT or LIBPROCESS_IP are configured in the environment,
    these will be used for socket connectivity.
     N/A bound_socket N/A N/A bind_sockets port address ip N/A 0 N/A N/A ip port N/A N/A bound_socket getsockname N/A N/A N/A ip N/A ip 0.0.0.0 N/A N/A ip N/A N/A socket gethostbyname N/A N/A socket gethostname N/A N/A bound_socket ip port N/A classmethod get_ip_port N/A N/A cls ip port N/A None None N/A N/A ip N/A ip N/A N/A N/A os environ get LIBPROCESS_IP 0.0.0.0 N/A N/A N/A port N/A int N/A port N/A N/A N/A os environ get LIBPROCESS_PORT 0 N/A N/A N/A ValueError N/A N/A N/A N/A cls Error Invalid ip/port provided N/A N/A ip port N/A classmethod singleton N/A N/A cls delegate N/A kw N/A N/A N/A cls _LOCK N/A N/A N/A cls _SINGLETON N/A N/A N/A N/A N/A cls _SINGLETON delegate delegate N/A N/A N/A RuntimeError Attempting to construct different singleton context. N/A N/A N/A cls _SINGLETON N/A cls delegate delegate kw N/A N/A N/A N/A cls _SINGLETON start N/A N/A cls _SINGLETON N/A classmethod __init__ N/A N/A self delegate loop ip port N/A None None None N/A N/A Construct a compactor context.

    Before any useful work can be done with a context, you must call
    ``start`` on the context.

    :keyword ip: The ip port of the interface on which the Context should listen.
       If none is specified, the context will attempt to bind to the ip specified by
       the ``LIBPROCESS_IP`` environment variable.  If this variable is not set,
       it will bind on all interfaces.
    :type ip: ``str`` or None
    :keyword port: The port on which the Context should listen.  If none is specified,
       the context will attempt to bind to the port specified by the ``LIBPROCESS_PORT``
       environment variable.  If this variable is not set, it will bind to an ephemeral
       port.
    :type port: ``int`` or None
     N/A N/A self _processes N/A N/A N/A self _links N/A defaultdict set N/A N/A self delegate delegate N/A N/A self __loop N/A self http None N/A N/A self __event_loop loop N/A N/A self _ip None N/A N/A ip port N/A N/A self get_ip_port ip port N/A N/A N/A self __sock N/A self ip N/A self port N/A N/A self _make_socket ip port N/A N/A self _connections N/A N/A N/A self _connection_callbacks N/A defaultdict list N/A N/A self _connection_callbacks_lock N/A N/A threading Lock N/A N/A self __context_name N/A CompactorContext(%s:%d) N/A N/A self ip N/A self port N/A N/A N/A N/A super Context self __init__ name N/A self __context_name N/A N/A self daemon True N/A N/A self lock N/A N/A threading Lock N/A N/A self __id 1 N/A N/A self __loop_started N/A N/A threading Event N/A _assert_started N/A N/A self N/A N/A N/A N/A N/A N/A self __loop_started is_set N/A start N/A N/A self N/A N/A N/A Start the context.  This method must be called before calls to ``send`` and ``spawn``.

    This method is non-blocking.
     N/A N/A N/A N/A super Context self start N/A N/A N/A N/A self __loop_started wait N/A __debug N/A N/A self msg N/A N/A N/A N/A N/A log debug N/A %s: %s N/A N/A self __context_name msg N/A run N/A N/A self N/A N/A N/A loop N/A N/A self __event_loop N/A N/A asyncio new_event_loop CustomIOLoop N/A BaseAsyncIOLoop N/A initialize N/A N/A self N/A N/A N/A N/A N/A N/A super CustomIOLoop self initialize loop close_loop False N/A N/A N/A N/A self __loop N/A CustomIOLoop N/A N/A self http N/A HTTPD N/A self __sock N/A self __loop N/A N/A N/A N/A self __loop_started set N/A N/A N/A N/A self __loop start N/A N/A N/A N/A self __loop close N/A _is_local N/A N/A self pid N/A N/A N/A N/A pid N/A self _processes N/A _assert_local_pid N/A N/A self pid N/A N/A N/A N/A N/A N/A self _is_local pid N/A N/A N/A N/A self InvalidProcess Operation only valid for local processes! N/A stop N/A N/A self N/A N/A N/A Stops the context.  This terminates all PIDs and closes all connections. N/A N/A N/A log info N/A Stopping %s self N/A pids N/A list N/A self _processes N/A pid pids N/A N/A N/A N/A self terminate pid N/A N/A self _connections N/A N/A pid N/A next N/A iter N/A self _connections N/A conn N/A N/A N/A self _connections pop pid None N/A conn N/A N/A N/A N/A conn close N/A N/A N/A N/A self __loop stop N/A spawn N/A N/A self process N/A N/A N/A Spawn a process.

    Spawning a process binds it to this context and assigns the process a
    pid which is returned.  The process' ``initialize`` method is called.

    Note: A process cannot send messages until it is bound to a context.

    :param process: The process to bind to this context.
    :type process: :class:`Process`
    :return: The pid of the process.
    :rtype: :class:`PID`
     N/A N/A N/A self _assert_started N/A N/A N/A process bind self N/A N/A N/A N/A self http mount_process process N/A N/A N/A self _processes N/A N/A process pid process N/A N/A N/A process initialize N/A N/A process pid N/A _get_dispatch_method N/A N/A self pid method N/A N/A N/A N/A N/A N/A getattr N/A N/A self _processes N/A pid method N/A N/A N/A KeyError N/A N/A N/A N/A self InvalidProcess N/A Unknown process %s pid N/A N/A AttributeError N/A N/A N/A N/A self InvalidMethod N/A Unknown method %s on %s N/A method pid N/A dispatch N/A N/A self pid method N/A args N/A N/A Call a method on another process by its pid.

    The method on the other process does not need to be installed with
    ``Process.install``.  The call is serialized with all other calls on the
    context's event loop.  The pid must be bound to this context.

    This function returns immediately.

    :param pid: The pid of the process to be called.
    :type pid: :class:`PID`
    :param method: The name of the method to be called.
    :type method: ``str``
    :return: Nothing
     N/A N/A N/A self _assert_started N/A N/A N/A self _assert_local_pid pid N/A function N/A N/A self _get_dispatch_method pid method N/A N/A N/A N/A self __loop add_callback function args N/A delay N/A N/A self amount pid method N/A args N/A N/A Call a method on another process after a specified delay.

    This is equivalent to ``dispatch`` except with an additional amount of
    time to wait prior to invoking the call.

    This function returns immediately.

    :param amount: The amount of time to wait in seconds before making the call.
    :type amount: ``float`` or ``int``
    :param pid: The pid of the process to be called.
    :type pid: :class:`PID`
    :param method: The name of the method to be called.
    :type method: ``str``
    :return: Nothing
     N/A N/A N/A self _assert_started N/A N/A N/A self _assert_local_pid pid N/A function N/A N/A self _get_dispatch_method pid method N/A N/A N/A N/A self __loop add_timeout N/A N/A N/A N/A self __loop time amount function args N/A __dispatch_on_connect_callbacks N/A N/A self to_pid stream N/A N/A N/A N/A self _connection_callbacks_lock N/A N/A callbacks N/A N/A N/A self _connection_callbacks pop to_pid N/A N/A callback callbacks N/A N/A N/A N/A log debug N/A Dispatching connection callback %s for %s:%s -> %s N/A callback N/A self ip N/A self port to_pid N/A N/A N/A N/A self __loop add_callback callback stream N/A _maybe_connect N/A N/A self to_pid callback N/A None N/A N/A Asynchronously establish a connection to the remote pid. N/A callback N/A N/A stack_context wrap N/A callback N/A N/A N/A stream N/A None streaming_callback N/A N/A data N/A N/A N/A N/A N/A log info N/A Received %d bytes from %s, discarding. N/A N/A len data to_pid N/A N/A N/A log debug N/A   data: %r N/A data N/A on_connect N/A N/A exit_cb stream N/A N/A N/A N/A N/A log info N/A Connection to %s established to_pid N/A N/A self _connection_callbacks_lock N/A N/A N/A N/A self _connections N/A to_pid stream N/A N/A N/A self __dispatch_on_connect_callbacks to_pid stream N/A N/A N/A N/A self __loop add_callback N/A stream read_until_close exit_cb streaming_callback streaming_callback N/A N/A create False N/A N/A self _connection_callbacks_lock N/A N/A stream N/A N/A N/A self _connections get to_pid N/A callbacks N/A N/A N/A self _connection_callbacks get to_pid N/A N/A stream N/A N/A N/A N/A N/A N/A self _connection_callbacks N/A to_pid append callback N/A N/A callbacks N/A N/A create True N/A stream N/A N/A N/A N/A N/A self __loop add_callback callback stream N/A N/A N/A create N/A N/A N/A sock N/A N/A socket socket N/A socket AF_INET N/A socket SOCK_STREAM 0 N/A N/A sock N/A N/A N/A N/A self SocketError Failed opening socket N/A stream N/A IOStream sock io_loop N/A self __loop N/A N/A N/A stream set_nodelay True N/A N/A N/A stream set_close_callback N/A partial N/A self __on_exit to_pid reached end of stream N/A connect_callback N/A partial on_connect N/A partial N/A self __on_exit to_pid stream N/A N/A N/A log info N/A Establishing connection to %s to_pid N/A N/A N/A stream connect N/A N/A to_pid ip N/A to_pid port callback connect_callback N/A N/A N/A stream closed N/A N/A N/A N/A self SocketError Failed to initiate stream connection N/A N/A N/A log info N/A Maybe connected to %s to_pid N/A _get_local_mailbox N/A N/A self pid method N/A N/A N/A N/A mailbox callable N/A N/A N/A N/A self _processes N/A pid iter_handlers N/A N/A N/A method mailbox N/A N/A callable N/A send N/A N/A self from_pid to_pid method body N/A None N/A N/A Send a message method from one pid to another with an optional body.

    Note: It is more idiomatic to send directly from a bound process rather than
    calling send on the context.

    If the destination pid is on the same context, the Context may skip the
    wire and route directly to process itself.  ``from_pid`` must be bound
    to this context.

    This method returns immediately.

    :param from_pid: The pid of the sending process.
    :type from_pid: :class:`PID`
    :param to_pid: The pid of the destination process.
    :type to_pid: :class:`PID`
    :param method: The method name of the destination process.
    :type method: ``str``
    :keyword body: Optional content to send along with the message.
    :type body: ``bytes`` or None
    :return: Nothing
     N/A N/A N/A self _assert_started N/A N/A N/A self _assert_local_pid from_pid N/A N/A N/A self _is_local to_pid N/A N/A local_method N/A N/A self _get_local_mailbox to_pid method N/A local_method N/A N/A N/A N/A log info N/A Doing local dispatch of %s => %s (method: %s) N/A from_pid to_pid local_method N/A N/A N/A N/A self __loop add_callback local_method from_pid N/A body N/A N/A N/A N/A request_data N/A encode_request from_pid to_pid method body body N/A N/A N/A log info N/A Sending POST %s => %s (payload: %d bytes) N/A from_pid N/A N/A to_pid as_url method N/A len request_data on_connect N/A N/A stream N/A N/A N/A N/A N/A log info N/A Writing %s from %s to %s N/A N/A len request_data from_pid to_pid N/A N/A N/A stream write request_data N/A N/A N/A log info N/A Wrote %s from %s to %s N/A N/A len request_data from_pid to_pid N/A N/A N/A N/A N/A self __loop add_callback N/A self _maybe_connect to_pid on_connect N/A __erase_link N/A N/A self to_pid N/A N/A N/A N/A pid links N/A N/A N/A self _links items N/A N/A N/A N/A N/A N/A links remove to_pid N/A N/A N/A log debug N/A PID link from %s <- %s exited. N/A pid to_pid N/A N/A N/A N/A N/A self _processes N/A pid exited to_pid N/A N/A N/A KeyError N/A N/A N/A __on_exit N/A N/A self to_pid body N/A N/A N/A N/A N/A log info Disconnected from %s (%s) to_pid body N/A stream N/A N/A N/A self _connections pop to_pid None N/A N/A stream None N/A N/A N/A N/A log error N/A Received disconnection from %s but no stream found. to_pid N/A N/A N/A self __erase_link to_pid N/A link N/A N/A self pid to N/A N/A N/A Link a local process to a possibly remote process.

    Note: It is more idiomatic to call ``link`` directly on the bound Process
    object instead.

    When ``pid`` is linked to ``to``, the termination of the ``to`` process
    (or the severing of its connection from the Process ``pid``) will result
    in the local process' ``exited`` method to be called with ``to``.

    This method returns immediately.

    :param pid: The pid of the linking process.
    :type pid: :class:`PID`
    :param to: The pid of the linked process.
    :type to: :class:`PID`
    :returns: Nothing
     N/A N/A N/A self _assert_started really_link N/A N/A N/A N/A N/A N/A N/A N/A N/A self _links N/A pid add to N/A N/A N/A log info N/A Added link from %s to %s N/A pid to N/A on_connect N/A N/A stream N/A N/A N/A N/A really_link N/A N/A N/A N/A self _is_local pid N/A N/A N/A really_link N/A N/A N/A N/A N/A self __loop add_callback N/A self _maybe_connect to on_connect N/A terminate N/A N/A self pid N/A N/A N/A Terminate a process bound to this context.

    When a process is terminated, all the processes to which it is linked
    will be have their ``exited`` methods called.  Messages to this process
    will no longer be delivered.

    This method returns immediately.

    :param pid: The pid of the process to terminate.
    :type pid: :class:`PID`
    :returns: Nothing
     N/A N/A N/A self _assert_started N/A N/A N/A log info N/A Terminating %s pid N/A process N/A N/A N/A self _processes pop pid None N/A process N/A N/A N/A N/A log info N/A Unmounting %s process N/A N/A N/A N/A self http unmount_process process N/A N/A N/A self __erase_link pid N/A __str__ N/A N/A self N/A N/A N/A N/A Context(%s:%s) N/A N/A self ip N/A self port N/A N/A