This is a flag to check for kernel setup.
If this comm attempts to connect and fails, then #connectToComm()
will
set this to true
and wait for a special blob to arrive on the kernel
IOPub channel. This blob has a mavenomics_state_ok
key in it's
transient
dict, and is sent by the library __init__
to signal that
the kernel is now setup and ready to accept connections. When that
happens, this will be cleared and the CommManager will again call
#connectToComm()
to setup the channel.
Throws an error whenever the comm has closed.
The name of the comm channel that this manager communicates with
Emits when the comm has opened.
Whether this manager has been cleaned up
Whether this comm is online and ready to communicate.
An Observable that emits whenever a message is sent by the kernel
Send a message without expecting a response.
The message to send to the kernel
Send a message and wait for a response from the kernel.
The message to send to the kernel
A predicate to select the desired response from the kernel
A timeout to reject if no response is recieved in.
Note: The timeout is not optional. Various things may cause comm death and while this function will try it's best, not all cases can be accounted for (such as the network disconnecting or the kernel freezing)
Create a new CommManager, or recycle an already-instantiated manager
Generated using TypeDoc
Manage a comm for a session, reconnecting when necessary.
MsgType - A type describing the shape of messages sent to the kernel ResponseType - A type describing the shape of messages sent to the client
Comm management is a very complex topic, covered here in some detail: https://docs.google.com/document/d/1Wg6LHCb9aesxZ-WjHenZHejKbX-J6LeBktThsz2G87E/edit#
A CommManager connects to a comm channel and handles the cross-cutting concerns of keeping that comm alive and handling what to do when it dies. This class only works for client-initiated, kernel-side comms.