[Tutor] Threading + socket server (blocking IO)

Liam Clarke ml.cyresse at gmail.com
Mon Feb 6 09:09:18 CET 2006


Hi all,

About to embark on my first foray into threading, and rather unsure of
initial approach. I have a basic UDPServer from SocketServer running
using serve_forever(). I'd like to stick this in a thread where it can
endlessly loop waiting for incoming packets, and pushing the received
data into a list where it can be retrieved and operated on by another
thread, until such time as the controlling app terminates it.

Is this going to be possible? I've been reading about GIL and what not
in the Tutor archives and this presentation here -
http://starship.python.net/crew/aahz/OSCON2001/ but I'm a little
unsure as to what is possible.

Regards,


Liam Clarke


More information about the Tutor mailing list