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
Regarding #28 I don't remember exactly the reason why it was never closed but just looking at it again [1] I think calling "flush" all the time doesn't feel right to me. If that is the case one can use PYTHONUNBUFFERED environment variable. I'd say practically it should have the same effect. So we don't need to call flush. Which was also discussed in #22
For the diff you added here, as I understand you simply want to remove the pipes. So that create_subprocess_exec will pass it to loop.subprocess_exec which already handles the io direction anyways. (Please correct me, if I'm missing something).
For this approach, I don't have many arguments against it. It will remove some code and pass it to the framework. Maybe we can put limit= as an environment variable, in case someone needs to fine tune the buffer.
When I first write this I used pyuv, then moved it to tornado, then moved it to asyncio. I honestly don't remember if there was a specific reason to keep pipes and handle forwarding. It might be simply just because of I wanted to keep it on par with tornado.
I'd say, can you put it into a pull request and we can merge and try ?
It appears that the buffering of the subprocess output interferes with shell redirection. Observe a lack of output in either case:
single-beat python test/long_waiting_process.py | less
single-beat python test/long_waiting_process.py > log
I'm curious what the rationale for buffering this output is rather than sending it directly to
sys.stdout
/sys.stderr
via the patch below:The text was updated successfully, but these errors were encountered: