Message7044

Author ajdavis
Recipients ajdavis, fwierzbicki
Date 2012-04-10.23:56:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1334102215.72.0.408615484151.issue1854@psf.upfronthosting.co.za>
In-reply-to
Content
$ 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
History
Date User Action Args
2012-04-10 23:56:55ajdavissetmessageid: <1334102215.72.0.408615484151.issue1854@psf.upfronthosting.co.za>
2012-04-10 23:56:55ajdavissetrecipients: + ajdavis, fwierzbicki
2012-04-10 23:56:55ajdavislinkissue1854 messages
2012-04-10 23:56:55ajdaviscreate