--- jsr166/src/jsr166y/LinkedTransferQueue.java 2008/10/03 00:39:48 1.8
+++ jsr166/src/jsr166y/LinkedTransferQueue.java 2009/01/12 17:16:18 1.12
@@ -21,7 +21,7 @@ import java.lang.reflect.*;
* producer. The tail of the queue is that element that has
* been on the queue the shortest time for some producer.
*
- *
Beware that, unlike in most collections, the size
+ *
Beware that, unlike in most collections, the {@code size}
* method is NOT a constant-time operation. Because of the
* asynchronous nature of these queues, determining the current number
* of elements requires a traversal of the elements.
@@ -51,19 +51,19 @@ public class LinkedTransferQueue exte
private static final long serialVersionUID = -3223113410248163686L;
/*
- * This is still a work in progress...
- *
* This class extends the approach used in FIFO-mode
* SynchronousQueues. See the internal documentation, as well as
* the PPoPP 2006 paper "Scalable Synchronous Queues" by Scherer,
* Lea & Scott
* (http://www.cs.rice.edu/~wns1/papers/2006-PPoPP-SQ.pdf)
*
- * The main extension is to provide different Wait modes
- * for the main "xfer" method that puts or takes items.
- * These don't impact the basic dual-queue logic, but instead
- * control whether or how threads block upon insertion
- * of request or data nodes into the dual queue.
+ * The main extension is to provide different Wait modes for the
+ * main "xfer" method that puts or takes items. These don't
+ * impact the basic dual-queue logic, but instead control whether
+ * or how threads block upon insertion of request or data nodes
+ * into the dual queue. It also uses slightly different
+ * conventions for tracking whether nodes are off-list or
+ * cancelled.
*/
// Wait modes for xfer method
@@ -97,11 +97,11 @@ public class LinkedTransferQueue exte
static final long spinForTimeoutThreshold = 1000L;
/**
- * Node class for LinkedTransferQueue. Opportunistically subclasses from
- * AtomicReference to represent item. Uses Object, not E, to allow
- * setting item to "this" after use, to avoid garbage
- * retention. Similarly, setting the next field to this is used as
- * sentinel that node is off list.
+ * Node class for LinkedTransferQueue. Opportunistically
+ * subclasses from AtomicReference to represent item. Uses Object,
+ * not E, to allow setting item to "this" after use, to avoid
+ * garbage retention. Similarly, setting the next field to this is
+ * used as sentinel that node is off list.
*/
static final class QNode extends AtomicReference