[IPython-User] Launching IPython kernel in a new thread instead of new process
Tue Mar 19 11:33:44 CDT 2013
On Mon, Mar 18, 2013 at 10:29 PM, Marc Liyanage <email@example.com> wrote:
> When I launch IPython notebook, a new process is launched for the kernel.
> I was wondering if it's possible to prevent that and instead run the kernel
> in a new thread of the same process. I can use the C API and instantiate
> multiple Python environments if that helps.
> There are two reasons why I'd like to avoid forking:
> 1.) On OS X, the process gets killed if it is already multithreaded, and
> for a GUI app that's always the case
> 2.) I'd like to use the Objective-C bridge and let the Python code access
> Obj-C objects in the same process
> Is this possible, or is IPython fundamentally based on fork/exec?
You would definitely need to start a new Python, because there can only be
one Kernel in a given Python environment. I've never thought about
multiple Pythons in a single process - you would definitely have problems
when users interrupt or restart kernels, since that's based on process
My guess is that this is probably not going to work without significant
restructuring of IPython, which is unlikely to happen.
> IPython-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-User