C# (CSharp) BitSharper.Threading.Execution Namespace

Classes

Name Description
CancellationException
ExecutionException
RejectedExecutionException
ThreadPoolExecutor An IExecutorService that executes each submitted task using one of possibly several pooled threads, normally configured using Executors factory methods.
ThreadPoolExecutor.AbortPolicy A IRejectedExecutionHandler for rejected tasks that throws a RejectedExecutionException.
ThreadPoolExecutor.CallerRunsPolicy A handler for rejected tasks that runs the rejected task directly in the calling thread of the IRunnable.Run method, unless the executor has been shut down, in which case the task is discarded.
ThreadPoolExecutor.DiscardOldestPolicy A IRejectedExecutionHandler for rejected tasks that discards the oldest unhandled request and then retries IExecutor.Execute(IRunnable), unless the executor is shut down, in which case the task is discarded.
ThreadPoolExecutor.DiscardPolicy A RejectedExecutionHandler for rejected tasks that silently discards the rejected task.
ThreadPoolExecutor.Worker Class Worker mainly maintains interrupt control state for threads running tasks, along with other minor bookkeeping. This class opportunistically extends ReentrantLock to simplify acquiring and releasing a lock surrounding each task execution. This protects against interrupts that are intended to wake up a worker thread waiting for a task from instead interrupting a task being run.