[concurrency-interest] Class striped/ordered Thread Pool

David Holmes davidcholmes at aapt.net.au
Fri May 11 01:07:50 EDT 2012

Not sure if this makes sense unless you use a SingleThreadExecutor per
stripeClass. Otherwise you have races in the submission of StripedRunners of
the same stripeClass, and even if you order the queue so that they start
execution in the right order, you can't guarantee what order they will
complete in. Unless it is all done by a single thread.

David Holmes
  -----Original Message-----
  From: concurrency-interest-bounces at cs.oswego.edu
[mailto:concurrency-interest-bounces at cs.oswego.edu]On Behalf Of Glenn
  Sent: Friday, 11 May 2012 2:54 PM
  To: concurrency-interest at cs.oswego.edu
  Subject: [concurrency-interest] Class striped/ordered Thread Pool

  Hello all,

  I'm looking for a thread pool with the following characteristics... (in

  interface StripedRunner {
      Object getStripeClass();
      void run();

  magicPool.execute( stripedRunner );

  The idea being that any StripedRunners with the same stripeClass would get
executed in the order they were queued,
  but StripedRunners with different stripedClasses could execute

  Is there a way to configure the standard concurrent pools to work this way
(doesn't seem to be), or a way to extends
  the current code?

  Or perhaps some third party library implementation?


  Glenn McGregor

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20120511/cd39c163/attachment.html>

More information about the Concurrency-interest mailing list