Issue2001
Created on 2012-12-29.18:36:12 by ajdavis, last changed 2014-06-19.06:08:42 by zyasoft.
File name |
Uploaded |
Description |
Edit |
Remove |
deque_play.py
|
ajdavis,
2012-12-29.18:36:11
|
|
|
|
msg7558 (view) |
Author: A. Jesse Jiryu Davis (ajdavis) |
Date: 2012-12-29.18:36:11 |
|
The deque docs say that "Deques support thread-safe, memory efficient appends and pops from either side of the deque", but deque.popleft() isn't thread-safe. Under some circumstances the attached script throws a NullPointerException:
Exception in thread Thread:Traceback (most recent call last):
File "/Users/emptysquare/jython2.5.2/Lib/threading.py", line 179, in _Thread__bootstrap
self.run()
File "/Users/emptysquare/jython2.5.2/Lib/threading.py", line 170, in run
self._target(*self._args, **self._kwargs)
File "deque_play.py", line 9, in f
q.popleft()
NullPointerException: java.lang.NullPointerException
... under others it simply throws "IndexError: pop from an empty deque". Either error is wrong and inconsistent with the docs and with CPython's behavior.
|
msg8721 (view) |
Author: Jim Baker (zyasoft) |
Date: 2014-06-19.06:08:42 |
|
Fixed as of http://hg.python.org/jython/rev/759e56cfcac7
|
|
Date |
User |
Action |
Args |
2014-06-19 06:08:42 | zyasoft | set | status: open -> closed resolution: fixed messages:
+ msg8721 nosy:
+ zyasoft |
2013-02-20 00:25:21 | fwierzbicki | set | priority: normal versions:
+ Jython 2.7, - 2.5.2, 2.7a2 |
2013-02-09 13:56:58 | amak | set | nosy:
+ amak |
2012-12-30 18:28:15 | fwierzbicki | set | nosy:
+ fwierzbicki |
2012-12-29 18:36:21 | ajdavis | set | versions:
+ 2.7a2 |
2012-12-29 18:36:12 | ajdavis | create | |
|