Another non blocking method in thread
animator333 at gmail.com
Sun Jun 10 14:38:13 CEST 2012
I have created a very simple client-server model using sockets. Server is created by sub classing threading.thread. The 'run' method is continuously listening for client's response. When server send a string to client, client response back by changing that string into uppercase.
I would like to synchronize send and receive. For example:
def sendmsg(self, msg):
#wait until next msg is received in 'run'
I tried using a while loop for waiting but it's blocking the 'run' method. Don't know much about threading event and lock and if they can help me here.
More information about the Python-list