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.2.3rc1~554 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a49ed7650a86a01ddc77486e335d31031ef6086c;p=thirdparty%2FPython%2Fcpython.git 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 baca4c12c7af..197ca0933f2f 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: