[IPython-dev] BackgroundJobManager: Killing a background job

Thomas Kluyver takowl at gmail.com
Wed Jan 29 14:53:19 EST 2014


On 28 January 2014 21:27, TARUN GABA <tarun.gaba7 at gmail.com> wrote:

> I want to kill a particular job, manually, when it exceeds running for
> more than a particular interval of time.. Is there any method in
> BackgroundJobManager to do that?


No, it uses threads, and there's no good way to kill a thread in Python.
However, if you can write your functions to check a variable at each step
in a loop and return if it's set, then you can stop them from the outside
that way.

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140129/7257613d/attachment.html>


More information about the IPython-dev mailing list