You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ptpython becomes unresponsive with no error message. There may be a clue from running ptipython I get this error message before the terminal becomes unresponseive:
The history saving thread hit an unexpected error (LoopExit('This operation would block forever',)).History will not be written to the databa.
I'm using git clones of ptpython and prompt-toolkit from about an hour ago.
I experienced the same issue, I could workaround it temporarily by doing:
from gevent import monkey; monkey.patch_all(thread=False)
(of course, threads are not replaced by greenlets in this case, but this was ok for me)
Unfortunately it brought another problem: in the posix event loop some threads are created,
and for some reason it was not properly cleaned up so each time a thread was created it was
opening a new file descriptor for a new gevent loop (one for each thread, since they are not
patched), and left it opened until the limit of opened files was reached.
I decided to go for my own gevent-friendly event loop, hopefully I will soon make a PR for the
project if people are interested ?
Activity
jonathanslenders commentedon May 2, 2016
Thanks for this. Not sure what's going on, but this needs some investigation.
mguijarr commentedon Jun 21, 2016
I experienced the same issue, I could workaround it temporarily by doing:
from gevent import monkey; monkey.patch_all(thread=False)(of course, threads are not replaced by greenlets in this case, but this was ok for me)
Unfortunately it brought another problem: in the posix event loop some threads are created,
and for some reason it was not properly cleaned up so each time a thread was created it was
opening a new file descriptor for a new gevent loop (one for each thread, since they are not
patched), and left it opened until the limit of opened files was reached.
I decided to go for my own gevent-friendly event loop, hopefully I will soon make a PR for the
project if people are interested ?
JohnLunzer commentedon Jun 21, 2016
Definitely interested in a fix. Thank you for looking into it more deeply than I did.
Contribute a new gevent-compliant event loop (see issue prompt-toolki…
mguijarr commentedon Jul 13, 2016
I finally made a PR, I hope it helps - I do not have much time to dedicate on this, but at least you should see how I solved the problem.
I realize a new event loop should probably go to the prompt-toolkit project ?