An implementation of Executor that queues incoming
requests until they can be processed by a single background
thread.
The thread is not actually started until the first
execute request is encountered. Also, if the
thread is stopped for any reason (for example, after hitting
an unrecoverable exception in an executing task), one is started
upon encountering a new request, or if restart() is
invoked.
Beware that, especially in situations
where command objects themselves invoke execute, queuing can
sometimes lead to lockups, since commands that might allow
other threads to terminate do not run at all when they are in the queue.
[ Introduction to this package. ]
|