[Tutor] Threading + socket server (blocking IO)
Kent Johnson
kent37 at tds.net
Mon Feb 6 12:28:15 CET 2006
Liam Clarke wrote:
> 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.
Python has good support for multiple threads running on a single
processor. The GIL prevents Python from effectively running multiple
threads on multiple processors.
You might also be interested in Twisted which provides
industrial-strength servers using an asynchronous model rather than
threading. There is an example of a simple UDP echo server here:
http://twistedmatrix.com/projects/core/documentation/examples/echoserv_udp.py
Kent
More information about the Tutor
mailing list