Package org.lobobrowser.util
Class SimpleThreadPool
- java.lang.Object
-
- org.lobobrowser.util.SimpleThreadPool
-
public class SimpleThreadPool extends java.lang.ObjectA thread pool that allows cancelling all running tasks without shutting down the thread pool.
-
-
Constructor Summary
Constructors Constructor Description SimpleThreadPool(java.lang.String name, int minShrinkToThreads, int maxThreads, int idleAliveMillis)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel(SimpleThreadPoolTask task)voidcancelAll()Cancels all waiting tasks and any currently running task.voidschedule(SimpleThreadPoolTask task)
-
-
-
Method Detail
-
schedule
public void schedule(SimpleThreadPoolTask task)
-
cancel
public void cancel(SimpleThreadPoolTask task)
-
cancelAll
public void cancelAll()
Cancels all waiting tasks and any currently running task.
-
-