S
Sebastien GIRAUD
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.
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.