ThreadingTCPServer: sock.recv() doesn't block?
Prepscius, Colin (IT)
Colin.Prepscius at morganstanley.com
Wed Apr 2 09:19:57 EDT 2008
So I'm using the ThreadingTCPServer from the python standard library
SocketServer, and calling serve_forever on it. In my handler's handle
method, I call self.request.recv(x) in a loop until I've received n
bytes. But recv() returns immediately with nothing, over and over. It
all still works, but my cpu pegs. I thought socketc.recv() was supposed
to block. Anybody know if I'm doing something wrong?
thanks!
Colin
--------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080402/74928b4c/attachment.html>
More information about the Python-list
mailing list