xuanyuan300 / subprocdev

Automatically exported from code.google.com/p/subprocdev
0 stars 0 forks source link

Windows: Use async IO and remove the threads. #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It would be great that communicate() does not need to spawn 2 threads to
read stdout & stderr.

It could use ReadFile and WriteFile with an "overlapped" structure set.
The overlapped contains an Event handle, which gets signaled when the call
is complete. Then communicate() would repeatedly call
WaitForMultipleObject() and process available data.

Original issue reported on code.google.com by amaur...@gmail.com on 7 Sep 2009 at 11:22