[pypy-commit] pypy default: make status variable global to threads
Matti Picus
noreply at buildbot.pypy.org
Tue Apr 22 12:38:38 CEST 2014
Author: Matti Picus <matt.picus at gmail.com>
Branch:
Changeset: r70853:15901b2a8362
Date: 2014-04-22 12:56 +0300
http://bitbucket.org/pypy/pypy/changeset/15901b2a8362/
Log: make status variable global to threads
diff --git a/rpython/rlib/test/test_rsocket.py b/rpython/rlib/test/test_rsocket.py
--- a/rpython/rlib/test/test_rsocket.py
+++ b/rpython/rlib/test/test_rsocket.py
@@ -165,11 +165,11 @@
sock.listen(1)
s2 = RSocket(AF_INET, SOCK_STREAM)
s2.settimeout(10.0) # test one side with timeouts so select is used, shouldn't affect test
- connected = False
+ connected = [False] #thread-mutable list
def connecting():
try:
s2.connect(addr)
- connected = True
+ connected[0] = True
finally:
lock.release()
lock = thread.allocate_lock()
@@ -180,7 +180,7 @@
s1 = RSocket(fd=fd1)
print 'connection accepted'
lock.acquire()
- assert connected
+ assert connected[0]
print 'connecting side knows that the connection was accepted too'
assert addr.eq(s2.getpeername())
#assert addr2.eq(s2.getsockname())
More information about the pypy-commit
mailing list