Comm
Comm¶
An implementation of Comm.
async_kernel.comm ¶
Classes:
-
Comm
–An implementation of
comm.BaseComms
for async-kernel.
Comm ¶
An implementation of comm.BaseComms
for async-kernel.
Note
kernel
is added/removed by the CommManager.kernel
is added to the CommManager by the kernel once the sockets have been opened.- publish_msg is no-op when kernel is unset.
Methods:
-
handle_msg
–Handle a comm_msg message
-
publish_msg
–Helper for sending a comm message on IOPub.
handle_msg ¶
handle_msg(msg: MessageType) -> None
Handle a comm_msg message
Source code in src/async_kernel/comm.py
63 64 65 66 67 |
|
publish_msg ¶
publish_msg(
msg_type: str,
data: MaybeDict = None,
metadata: MaybeDict = None,
buffers: BuffersType = None,
**keys,
)
Helper for sending a comm message on IOPub.
Source code in src/async_kernel/comm.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|
CommManager ¶
CommManager()
The comm manager for all Comm instances.
Note
- When the trait
CommManager.kernel
is set theComm.kernel
trait is set on all async_kernel.comm.Comm instances. - The
Comm
will only send messages when the kernel is set. - The
kernel
setsCommManager.kernel
when its ready the iopub socket is open.
Methods:
-
register_comm
–Register a new comm
Source code in src/async_kernel/comm.py
92 93 |
|
register_comm ¶
register_comm(comm: BaseComm) -> str
Register a new comm
Source code in src/async_kernel/comm.py
102 103 104 105 106 107 |
|
set_comm ¶
set_comm()
Monkey patch the comm module's functions to provide iopub comms.
comm.create_comm
to async_kernel.comm.Comm.comm.get_com_manager
to async_kernel.comm.CommManager.
Source code in src/async_kernel/comm.py
117 118 119 120 121 122 123 124 125 |
|