Re: Seeming Non-determinism in Java Programs
Randall R Schulz <[email protected]> Sun, 6 Apr 2008 21:42:50 -0700
| Newsgroups | gmane.comp.windows.devel.java.advanced |
|---|---|
| Message-ID | <[email protected]> |
On Sunday 06 April 2008 20:56, Stephen Denne wrote: > Randall R Schulz wrote: > > ... > > > > > > You haven't explicitly mentioned it... but are you using > > > java.util.PriorityQueue? > > > > No. But I think it's of the same lineage. I originally took > > it from Doug Lea's Heap ... > > For reference, java.util.PriorityQueue javadocs say: > > Note that this implementation is not synchronized. Multiple threads > should not access a PriorityQueue instance concurrently if any of the > threads modifies the queue. Instead, use the thread-safe > PriorityBlockingQueue class. Yes, but that's neither here nor there. As I said, this is a single-threaded application. And as I recalled, the current standard library PriorityQueue is derived from Doug Lea's code: * @since 1.5 * @version 1.16, 04/21/06 * @author Josh Bloch, Doug Lea Randall Schulz =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com