From: Charles-François Natali Date: Wed, 21 Sep 2011 20:03:58 +0000 (+0200) Subject: Fix a race condition in test_socket.ThreadableTest: the client is reported as X-Git-Tag: v3.3.0a1~1504^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a49ed7650a86a01ddc77486e335d31031ef6086c;p=python Fix a race condition in test_socket.ThreadableTest: the client is reported as ready before having been set up. --- diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index baca4c12c7..197ca0933f 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -156,8 +156,8 @@ class ThreadableTest: def clientRun(self, test_func): self.server_ready.wait() - self.client_ready.set() self.clientSetUp() + self.client_ready.set() if not hasattr(test_func, '__call__'): raise TypeError("test_func must be a callable function") try: