[cvs] / jsr166 / src / main / java / util / concurrent / LinkedTransferQueue.java Repository:
ViewVC logotype

Diff of /jsr166/src/main/java/util/concurrent/LinkedTransferQueue.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.23, Wed Sep 1 21:43:08 2010 UTC revision 1.24, Wed Sep 1 21:55:34 2010 UTC
# Line 342  Line 342 
342       * When these cases arise, rather than always retraversing the       * When these cases arise, rather than always retraversing the
343       * entire list to find an actual predecessor to unlink (which       * entire list to find an actual predecessor to unlink (which
344       * won't help for case (1) anyway), we record a conservative       * won't help for case (1) anyway), we record a conservative
345       * estimate of possible unsplice failures (in "sweepVotes").  We       * estimate of possible unsplice failures (in "sweepVotes").
346       * trigger a full sweep when the estimate exceeds a threshold       * We trigger a full sweep when the estimate exceeds a threshold
347       * indicating the maximum number of estimated removal failures to       * ("SWEEP_THRESHOLD") indicating the maximum number of estimated
348       * tolerate before sweeping through, unlinking cancelled nodes       * removal failures to tolerate before sweeping through, unlinking
349       * that were not unlinked upon initial removal. We perform sweeps       * cancelled nodes that were not unlinked upon initial removal.
350       * by the thread hitting threshold (rather than background threads       * We perform sweeps by the thread hitting threshold (rather than
351       * or by spreading work to other threads) because in the main       * background threads or by spreading work to other threads)
352       * contexts in which removal occurs, the caller is already       * because in the main contexts in which removal occurs, the
353       * timed-out, cancelled, or performing a potentially O(n)       * caller is already timed-out, cancelled, or performing a
354       * operation (i.e., remove(x)), none of which are time-critical       * potentially O(n) operation (e.g. remove(x)), none of which are
355       * enough to warrant the overhead that alternatives would impose       * time-critical enough to warrant the overhead that alternatives
356       * on other threads.       * would impose on other threads.
357       *       *
358       * Because the sweepVotes estimate is conservative, and because       * Because the sweepVotes estimate is conservative, and because
359       * nodes become unlinked "naturally" as they fall off the head of       * nodes become unlinked "naturally" as they fall off the head of

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8