Donovan Baarda wrote: > On Mon, 2005-03-21 at 17:32 +1200, Greg Ewing wrote: >> >>I don't agree with that. There's no need to use non-blocking >>I/O when using select(), and in fact things are less confusing >>if you don't. > > Because staller.py outputs and flushes a fragment of data smaller than > selector.py uses for its reads, the select statement is triggered, but > the corresponding read blocks. Your selector.py is using file object read/write methods, not os.read and os.write. I fully agree that you can't reliably use stdio-style I/O in conjunction with select(). But as long as you use os-level I/O, there shouldn't be any need to make anything non-blocking. -- Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg.ewing at canterbury.ac.nz +--------------------------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4