From: Charles-François Natali Date: Wed, 21 Sep 2011 20:02:27 +0000 (+0200) Subject: Fix a race condition in test_socket.ThreadableTest: the client is reported X-Git-Tag: v2.7.3rc1~442 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2156594d8c9ce7ca8b3552d4a3e1043bc602d717;p=python Fix a race condition in test_socket.ThreadableTest: the client is reported ready before having been set up. --- diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 12e09dddeb..0d6240d8e1 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -145,8 +145,8 @@ class ThreadableTest: def clientRun(self, test_func): self.server_ready.wait() - self.client_ready.set() self.clientSetUp() + self.client_ready.set() with test_support.check_py3k_warnings(): if not callable(test_func): raise TypeError("test_func must be a callable function.")