readline() blocks after select() says there's data??
Grant Edwards
grante at visi.com
Fri Mar 15 12:39:06 EST 2002
In article <uk7sdzqem.fsf at ctwd0143.fitlinxx.com>, David Bolen wrote:
> grante at visi.com (Grant Edwards) writes:
>
>> That is true under Win32 -- Just one of the problems when using
>> an OS where the networking was pasted on (badly) as an
>> afterthought.
>>
>> Under Unix, select works on all file descriptors (sockets,
>> pipes, serial ports, etc.). That demonstrates the _right_ way
>> to paste on networking as an afterthought.
>
> Of course, to be fair, it's not really networking that was pasted on
> badly but rather the socket interface.
TCP/IP networking that was pasted on as an afterthought, and
that's when select came into the picture.
> If you're using native Win32 operations on native Win32 file
> handles, you can perform asynchronous I/O and wait for
> completion on just about all the native kernel objects
Are TCP/IP connection native kernel objects?
> - and even mix in other signaling objects simultaneously.
>
> And winsock does provide a way to tie socket I/O into the same
> event system.
>
> In Unix, select just happens to be a more generic function,
> whereas in Windows it was grafted on as part of the socket
> library. But that's more a portability issue than a comment on
> Windows internals.
Fair enough.
--
Grant Edwards grante Yow! I was giving HAIR
at CUTS to th' SAUCER PEOPLE
visi.com ... I'm CLEAN!!
More information about the Python-list
mailing list