-
Notifications
You must be signed in to change notification settings - Fork 95
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
Fix issue where large stdin writes can cause Tornado to hang #189
Conversation
Ah, seems like my assertion about the output size doesn't work on windows. Probably windows doesn't have |
I'd say skip that test on Windows. |
Yeah, I'm doing that real quick, also doing a quick change to the API to move the |
1c74a8d
to
8d24c24
Compare
The dedicated executor will be auto created by the manager, or can be specified at manager creation time if the caller wants to control the lifecycle. Also adds regression test for large input/output to the terminal and switches basic_test.py's fileformat to unix from dos so that it matches with the rest of the source code.
Ok, for real though this is my last time trying to make the linter happy... |
b696dd2
to
d671779
Compare
I was a bit concerned since technically making |
I think we're good, those tests pass. I tried testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thank you!
I'll cut a release with this tomorrow. |
A fix for #183
This includes switching to using a dedicated executor for blocking IO, specifically wrapping calls to ptyprocess.write which, can hang when the PTY buffer (the size of which is set by the OS) is exceeded. TermSocket users can provide their own thread pool by using the named
blocking_io_executor
parameter on initialization, but by default a shared, process-wide single threaded executor will be used.This also includes a regression test which will fail on Debian and OSX (but may be able to pass on some OSs due to the variance of the PTY buffer's size).
This also switched the default filetype of terminado/tests/basic_test.py from dos to unix to match with the rest of the files in this package and prevent some editors from auto-inserting carriage returns on save.