select.select question

Greg Ewing see_reply_address at something.invalid
Wed Aug 28 00:27:11 EDT 2002


Erno Kuusela wrote:

> In article <3D69C8F2.60507 at something.invalid>, Greg Ewing
> | You shouldn't be making the socket non-blocking. Select
> | will return immediately for a non-blocking socket,
> | whether there's data there or not.
> 
> i don't think so:
> 
>>>>s.setblocking(0)
>>>>from select import select
>>>>select([s], [], [], 1)
>>>>
>    (... one second passes ...)
> ([], [], [])


You're quite right. I'm not sure where I got that idea
from; I seem to remember having problems with this on a
BSD system some years ago. Maybe things worked differently
back then.

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg




More information about the Python-list mailing list