public class ConcurrentWorker extends Object
Tasks and Jobs, but differently
from Worker, execute them concurrently and not one after the other, though
the invocations to post(Task) or post(Job) will finish one after
the other. Worker,
so please think twice before using this class. AsyncWorker).
Worker would make it impossible to cancel the task, since task2 will
be executed only when task1 is finished. | Modifier and Type | Method and Description |
|---|---|
static EventPump |
getEventPump() |
static WorkerThread |
getWorkerThread() |
static Object |
post(Job job) |
static Object |
post(Task task) |
static void |
setEventPump(EventPump eventPump) |
static void |
setWorkerThread(WorkerThread workerThread) |
public static WorkerThread getWorkerThread()
Worker.getWorkerThread()public static void setWorkerThread(WorkerThread workerThread)
public static EventPump getEventPump()
Worker.getEventPump()public static void setEventPump(EventPump eventPump)
Worker.setEventPump(EventPump)public static Object post(Task task) throws Exception
ExceptionWorker.post(Task),
post(Job)public static Object post(Job job)
Worker.post(Job),
post(Task)Copyright © 2002-2011. All Rights Reserved.