Message7044
$ cat jython-set-screw.py
import threading
nthreads = 200
s = set(range(200))
threads = [threading.Thread(target=s.pop) for i in range(nthreads)]
for t in threads: t.start()
assert not len(s), "%d items left over" % len(s)
$ python --version
Python 2.7.1
$ python jython-set-screw.py
$ ./jython2.5.2/bin/jython --version
Jython 2.5.2
$ ./jython2.5.2/bin/jython jython-set-screw.py
Traceback (most recent call last):
File "jython-set-screw.py", line 6, in <module>
assert not len(s), "%d items left over" % len(s)
AssertionError: 2 items left over |
|
Date |
User |
Action |
Args |
2012-04-10 23:56:55 | ajdavis | set | messageid: <1334102215.72.0.408615484151.issue1854@psf.upfronthosting.co.za> |
2012-04-10 23:56:55 | ajdavis | set | recipients:
+ ajdavis, fwierzbicki |
2012-04-10 23:56:55 | ajdavis | link | issue1854 messages |
2012-04-10 23:56:55 | ajdavis | create | |
|