Quantcast

qtconsole heartbeat sensor during calls of compiled extensions?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

qtconsole heartbeat sensor during calls of compiled extensions?

Stefan
Hello,

I have built a python extension that wraps a C library. When I call a function from this library from the qtconsole, which doesn't return within 3 seconds, this triggers the heartbeat sensor:

"The kernel heartbeat has been inactive for 3.00 seconds. Do you want to restart the kernel? You may first want to check the network connection."

I found this feature useful before when my code really crashed, but here everything is fine, since I know that the library call will take some time. The command continues to execute in the qtconsole and returns properly (behind the warning window). So a workaround consists of waiting until the function returns and then clicking the heartbeat message away with "No".

However, I was wondering if there was a mechanism to tell the heartbeat sensor: "This is a call to a compiled extension which may take some time, and that's expected". Or is there a way to modify the time span, or switch it off altogether?

Many thanks for your suggestions,

Stefan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: qtconsole heartbeat sensor during calls of compiled extensions?

Thomas Kluyver-2
On 3 March 2012 20:14, Stefan <[hidden email]> wrote:
I have built a python extension that wraps a C library. When I call a
function from this library from the qtconsole, which doesn't return within 3
seconds, this triggers the heartbeat sensor:

What version of IPython are you using? I have a feeling this was fixed recently - the heartbeat responder should now run in a separate ZMQ context, so it doesn't get blocked by long-running library calls.

Thomas

_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: qtconsole heartbeat sensor during calls of compiled extensions?

Stefan
Hi Thomas,

Thanks for the reply.

I'm using ipython 0.12 in Mac OS X 10.7.2, installed with "pip install ipython". Does ipython 0.13.dev fix this?

Thanks,
Stefan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: qtconsole heartbeat sensor during calls of compiled extensions?

Thomas Kluyver-2
On 3 March 2012 20:42, Stefan <[hidden email]> wrote:
I'm using ipython 0.12 in Mac OS X 10.7.2, installed with "pip install
ipython". Does ipython 0.13.dev fix this?

I think it was fixed since 0.12, although I'm not 100% sure. Min did the fix, so he should have more details.

Thomas

_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: qtconsole heartbeat sensor during calls of compiled extensions?

MinRK


On Sat, Mar 3, 2012 at 13:00, Thomas Kluyver <[hidden email]> wrote:
On 3 March 2012 20:42, Stefan <[hidden email]> wrote:
I'm using ipython 0.12 in Mac OS X 10.7.2, installed with "pip install
ipython". Does ipython 0.13.dev fix this?

I think it was fixed since 0.12, although I'm not 100% sure. Min did the fix, so he should have more details.

Yes, bug was found and fixed not too long after the 0.12 release.

-MinRK
 


Thomas

_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Loading...