Warning

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

Module: kernel.zmq.parentpoller

2 Classes

class IPython.kernel.zmq.parentpoller.ParentPollerUnix

Bases: threading.Thread

A Unix-specific daemon thread that terminates the program immediately when the parent process no longer exists.

__init__()
class IPython.kernel.zmq.parentpoller.ParentPollerWindows(interrupt_handle=None, parent_handle=None)

Bases: threading.Thread

A Windows-specific daemon thread that listens for a special event that signals an interrupt and, optionally, terminates the program immediately when the parent process no longer exists.

__init__(interrupt_handle=None, parent_handle=None)

Create the poller. At least one of the optional parameters must be provided.

Parameters:

interrupt_handle : HANDLE (int), optional

If provided, the program will generate a Ctrl+C event when this handle is signaled.

parent_handle : HANDLE (int), optional

If provided, the program will terminate immediately when this handle is signaled.

static create_interrupt_event()

Create an interrupt event handle.

The parent process should use this static method for creating the interrupt event that is passed to the child process. It should store this handle and use it with send_interrupt to interrupt the child process.

run()

Run the poll loop. This method never returns.

static send_interrupt(interrupt_handle)

Sends an interrupt event using the specified handle.