Re: select(sock) indicates not-ready, but sock.recv does not block

2014-02-17 Thread Roy Smith
In article mailman.7083.1392618926.18130.python-l...@python.org, Nikolaus Rath nikol...@rath.org wrote: Hello, I have a problem with using select. I can reliably reproduce a situation where select.select((sock.fileno(),), (), (), 0) returns ((),(),()) (i.e., no data ready for reading), but

Re: select(sock) indicates not-ready, but sock.recv does not block

2014-02-17 Thread Nikolaus Rath
Nikolaus Rath nikol...@rath.org writes: Hello, I have a problem with using select. I can reliably reproduce a situation where select.select((sock.fileno(),), (), (), 0) returns ((),(),()) (i.e., no data ready for reading), but an immediately following sock.recv() returns data without

select(sock) indicates not-ready, but sock.recv does not block

2014-02-16 Thread Nikolaus Rath
Hello, I have a problem with using select. I can reliably reproduce a situation where select.select((sock.fileno(),), (), (), 0) returns ((),(),()) (i.e., no data ready for reading), but an immediately following sock.recv() returns data without blocking. I am pretty sure that this is not a race

Re: select(sock) indicates not-ready, but sock.recv does not block

2014-02-16 Thread Chris Angelico
On Mon, Feb 17, 2014 at 5:35 PM, Nikolaus Rath nikol...@rath.org wrote: Hello, I have a problem with using select. I can reliably reproduce a situation ... Can you reproduce it with a reasonably short amount of code? If so, please post it. I'm running Python 3.3.3 under Linux 3.12. Do you