This documentation is for an old version of IPython. You can find docs for newer versions here.

Module: kernel.channels

Base classes to manage a Client’s interaction with a running kernel

2 Classes

class IPython.kernel.channels.InvalidPortNumber

Bases: Exception

class IPython.kernel.channels.HBChannel(context=None, session=None, address=None)

Bases: threading.Thread

The heartbeat channel which monitors the kernel heartbeat.

Note that the heartbeat channel is paused by default. As long as you start this channel, the kernel manager will ensure that it is paused and un-paused as appropriate.

__init__(context=None, session=None, address=None)

Create the heartbeat monitor thread.


context : zmq.Context

The ZMQ context to use.

session : session.Session

The session to use.

address : zmq url

Standard (ip, port) tuple that the kernel is listening on.


This method is called in the ioloop thread when a message arrives.

Subclasses should override this method to handle incoming messages. It is important to remember that this method is called in the thread so that some logic must be done to ensure that the application level handlers are called in the application thread.


Is the heartbeat running and responsive (and not paused).


Pause the heartbeat.


The thread’s main activity. Call start() instead.


Stop the channel’s event loop and join its thread.


Unpause the heartbeat.