New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
time.time() in ipython notebook producing impossible results #2309
Comments
When I run this in notebook I get the expected output. Have you made any other gevent-related calls, or is this the only code that has been run in the process? Also, what version of gevent are you using? |
Thanks for the quick follow up. Indeed, if I restart the kernel the results make sense. But when I re-run gevent version info: (0, 13, 7) please see attached Jon Schull Jon.Schull@rit.edu cell: 585-738-6696 On Thu, Aug 16, 2012 at 1:14 PM, Min RK notifications@github.com wrote:
|
I can confirm that the second run encounters this issue with gevent-0.13, and does not with gevent 1.0-dev, so this is a gevent bug. The issue seems to be that the gevent loop timer is still running in the background while IPython is sitting idle, so when you do spawn(...3), the sleep seems to wake itself 3 seconds after the previous gevent call, not 3 seconds after the call to I'm closing this, because I can reproduce this behavior exactly without IPython at all, and has even been fixed in gevent-dev.
NB: GitHub comments do not support attachments. |
Thanks for your impressive, and impressively fast, analysis! Sent from my iPhone 585-738-6696; pls excuse tyops On Aug 17, 2012, at 7:05 PM, Min RK notifications@github.com wrote: I can confirm that the second run encounters this issue with gevent-0.13, The issue seems to be that the gevent loop timer is still running in the I'm closing this, because I can reproduce please see attached NB: GitHub comments do not support attachments. — |
This may be an interaction with gevent and ipython notebook.
I'm getting bogus results from code that produces sensible results when run from the command line with ipython.
Here's the code
The results I'm expecting come from running ipython test.py
The results I get from shift-enter within ipython are:
Our two task are allegedly complete 1 second after we begin (and supposedly after at least 3 seconds of sleeping.)
Of course, I might be confused.
The text was updated successfully, but these errors were encountered: