Comments (1)
This is a classic deadlock: A pipe only has a buffer of a few KB. So when the child process tries to write 140K, it's only able to write a little bit to the buffer, and then it has to wait for that buffer to be consumed to write more. The child process exits after it has written all of its data, but it can't write all its data until the parent process reads it. So in this particular case, you need to call proc.stdout.read_until_close()
before wait_for_exit
.
In general, if you mix multiple operations on a subprocess (wait_for_exit and reading from a stream, or reading from multiple streams), you need to think carefully about the order in which things might happen and this will likely require a more complicated structure than simple sequence of await
s (maybe a tornado.gen.WaitIterator
or asyncio
equivalents). But in the common cases reading from a single stream until close and then waiting for exit will work.
from tornado.
Related Issues (20)
- RFE: please start making github releases HOT 2
- Exclude test files from install HOT 6
- Incorrect type annotation on chain_future method
- Python 3.12 manylinux wheels HOT 2
- tornado 6.3.3 with gevent 23.7.0 hangup HOT 1
- Content-length validation does not handle spaces HOT 6
- How to set timeout on an Application and/or HTTPServer HOT 1
- httpclient_test: test_destructor_log is flaky on windows
- Python 3.11.5 error in ioloop.py HOT 3
- Inaccurate typing on HTTPHeaders
- py3.12: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal HOT 4
- Inaccurate typing for body/query argument getters
- High CPU consumption when upgrade to tornado > 5 HOT 2
- Can I write a single decorator combining @tornado.gen.coroutine and @run_on_executor. HOT 2
- Possible leak when exception is raised in inner coroutine HOT 1
- iostream: SSL logging is too noisy
- Tornado was blocked for more than 1 second in HOT 1
- static_url with a prefix does not work in a Template tag HOT 2
- how to handle the http stream data without using callback but based on coroutine? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tornado.