[concurrency-interest] LIFO ThreadPoolExecutor

Doug Lea dl@cs.oswego.edu
Mon, 1 Nov 2004 08:02:39 -0500


The jsr166x Deque interface and its implementations should be extended
to BlockingDeque to support blocking LIFO usages. In the mean time,
you might want to use the simple LinkedBlockingStack class that I had
once written as a classroom example of using ReentrantLock and
Condition.  It is not generally useful enough to be part of
java.util.concurrent, but you can get it from my miscellaneous code
page: http://gee.cs.oswego.edu/dl/code/ . You can use it in an
Executor by instantiating and sending in one of the messy
multiparameter ThreadPoolExecutor constructors.

-Doug