-
-
Notifications
You must be signed in to change notification settings - Fork 24
RuntimeError with run_until_complete() #19
Comments
Yep, this is correct - you can't use both run_until_complete and run_forever. You'll need to do something like this...
Which is a frustrating, roundabout way of doing what you originally intended - if you could confirm this works for you that would be good, but I'd like to leave this issue open to motivate me into making run_until_complete work in the way you tried to use it. It looks more intuitive to me. |
Yes this workaround worked. Confirmed. |
Just notice that after windows support merge this workaround doesn't work. There is no output on stdout at all. |
Hmm, that's puzzling. I'll take a look at this over the weekend and try to figure out why. Thanks for testing that! |
A small update - I've reproduced this and tracked the bug down to pipe transports being blocking, and our use of GLib.IOChannels being buffered. I've got a fix for it, I'm just coming up with a reliable test before committing to anything. |
Alright, I've got my test for this sorted, so I think it should be working with current master - could you give that another go? Then I can start working on a version of |
Seems OK on Linux, but fails on Windows. |
Simply changing run_forever() call to run() call inside def run_until_complete() in glib_events.py seems to work in my case. Do you think can it has any drawback? |
Apologies for radio silence! I've been away on holiday. I'll take a look as soon as I can :) |
This appears to be related to Windows support; the README calls out that Gbulb doesn't support Windows. I'm very much open to a PR that addresses this (although #32 would also need to be addressed); but until the project actually claims support for Windows, reporting bugs in Windows support isn't reasonable. |
PyChess is a chess client app https://github.com/pychess/pychess You can play human-human human-engine engine-engine games or play on freecehess.org also. I like to migrate it from threading to asyncio because of hard to track deadlock issues we are facing time to time. We run chess engines (like https://stockfishchess.org/) in background processes using threads to enable two way communication. Current SubProcess class is here: https://github.com/pychess/pychess/blob/master/lib/pychess/System/SubProcess.py
First I changed human-human game play to use asyncio in pychess asyncio branch. So far so good. Now I'm experimenting with create asyncio based subprocess to communicate with chess engines and get:
The text was updated successfully, but these errors were encountered: