Message8604

Author zyasoft
Recipients JonathanFeinberg, changeablecore8, duffy151, fwierzbicki, irmen, santa4nt, zyasoft
Date 2014-06-08.17:04:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1402247083.32.0.52195213395.issue1949@psf.upfronthosting.co.za>
In-reply-to
Content
We need to revisit the implementation of deque. Per https://docs.python.org/2/library/collections.html#collections.deque, operations are threadsafe. We do not currently implement this threadsafety requirement in Jython's implementation.

For the unbounded case, we should use http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ConcurrentLinkedDeque.html, which is new with Java 7. This seems to be a more or less exact match.

For the bounded case (with maxlen), the discard semantics are interesting and certainly not those of a synchronized ArrayDeque. We probably want to use an array of PyObject of size maxlen; then implement synchronized methods.

Exposing both approaches with the same API will require a modest amount of cleverness.
History
Date User Action Args
2014-06-08 17:04:43zyasoftsetmessageid: <1402247083.32.0.52195213395.issue1949@psf.upfronthosting.co.za>
2014-06-08 17:04:43zyasoftsetrecipients: + zyasoft, fwierzbicki, irmen, JonathanFeinberg, duffy151, santa4nt, changeablecore8
2014-06-08 17:04:43zyasoftlinkissue1949 messages
2014-06-08 17:04:42zyasoftcreate