Sockets/select: how to deal with multiple connections in threads?

Irmen de Jong irmen at USENET_NOSPAM_REMOVETHISxs4all.nl
Sun May 26 10:38:54 EDT 2002


Irmen de Jong wrote:

> I have something that works for now, but I'd like your advice & ideas.


To answer myself;  I got some suggestions by email:

- use asyncore / Medusa and forget about threading
- don't use a thread on each request, instead, create
  a thread and let it live. Let the main thread deal *only*
  with accept()-ing new connections.

Because my software (Pyro) currently is structured around threads,
I'm trying the second suggestion. First results look promising :-)


Irmen




More information about the Python-list mailing list