Threads for a newbe
Sebastien GIRAUD
seb.giraud78 at wanadoo.fr
Wed Dec 17 03:46:56 EST 2003
Hello,
First let say that am french and that i'll try to write the best english i can...
I'm a python newbe and have the following problem : I try to create 2 threads in a server program and they seems to block each other.
I use something like this :
start thread waiting for connexion with : server.threadserver = threading.Thread(target = self.__startserver)
then do while 1 :
socket, host = accept(...)
then start a new thread for each new connexion after accept using client.threadclient = threading.Thread(target = self.__receive)
and while 1 :
client.receive()
And here the first thread seems not to work anymore :( . I didn't join threads. Maybe a lock() problem but i don't now how to use the lock() function in Python...
Maybe if someone had a multithread server sample source I could understand what is the issue...
Regards
Seb.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20031217/21d52619/attachment.html>
More information about the Python-list
mailing list