dragon.mpbridge.connection

Dragon’s replacement for the Multiprocessing Connection and Pipe objects

Functions

Client(address[, family, authkey, original, ...])

DragonClient(address[, family, authkey])

Listener([address, family, backlog, ...])

Pipe([duplex, original, use_base_impl])

Generate two Connection objects to be used by only one process each.

activate_monkeypatch_connection_os()

rebuild_connection(df, readable, writable, ...)

reduce_connection(conn)

Classes

BaseImplListener

ConnGlue

Glue around dragon.infrastructure.connection.Connection.

ConnGlueBase

DragonConnection

DragonListener

PseudoOS

class ConnGlueBase

Bases: object

__init__(ucid, note, *args, **kwargs)
get_fd()
static extract_fd(conn_fileno)
write(*args, **kwargs)
read(*args, **kwargs)
close(*args, **kwargs)
classmethod pipe(_log_note='')
fileno()
class ConnGlue

Bases: ConnGlueBase

Glue around dragon.infrastructure.connection.Connection.

__init__(ucid, note, lowerlevel_conn, *args, **kwargs)
write(data, *args, **kwargs)
read(n_bytes=None, *args, **kwargs)
close(*args, **kwargs)
class DragonConnection

Bases: Connection

__init__(handle: ConnGlue, readable=True, writable=True)
fileno()

File descriptor or handle of the connection

Pipe(duplex=True, *, original=None, use_base_impl=True)

Generate two Connection objects to be used by only one process each.

Parameters:

duplex (bool) – If True, both ends of the Pipe may send and receive. Optional, defaults to True.

Returns:

tuple of connection objects

class DragonListener

Bases: Listener

__init__(*args, **kwargs)
class BaseImplListener

Bases: Listener

__init__(*args, **kwargs)
DragonClient(address, family=None, authkey=None)
Listener(address=None, family=None, backlog=1, authkey=None, *, ctx=None, use_base_impl=True)
Client(address, family=None, authkey=None, *, original=None, use_base_impl=True)
reduce_connection(conn)
rebuild_connection(df, readable, writable, handle)
class PseudoOS

Bases: object

write(*args, **kwargs)
read(*args, **kwargs)
close(*args, **kwargs)
pipe()
activate_monkeypatch_connection_os()