class · System.Threading
ThreadPool
public class System.Threading.ThreadPool : System.Any
Threads that run queued work: as many as processors, started with the first work item, kept for the program.
- Kind
- class
- Namespace
- System.Threading
- Assembly
- System.Core
- Access
- public, static, abstract
- Source file
Threading.ant
Inheritance
- Base classes
-
AnyThreadPool
Properties
Methods
static method QueueUserWorkItem(item: func<> : void) -> void
#
Runs item on a pool thread (an error it throws ends the program).
Private and internal members (8)
static field mutex: System.Threading.Mutex
#
static field waiting: System.Threading.Condition
#
static field work: System.Queue<func<> : void>
#
static field spinning: System.Threading.AtomicI32
#
static method Work() -> void
#
What each worker does: takes work, runs it, again. Before it sleeps it waits a little, giving the processor up in turns: work often comes right after.
static method Begin() -> void
#
Inherited members (5)
GetTypemethod from AnyUndescribedmethod from AnyToStringmethod from AnyHashmethod from Anydestroymethod from Any
Source
ThreadPool as Larva HIR, decompiled from its Larva HIR.
// Threads that run queued work: as many as processors, started with the first work item, kept for the program.
public class System.Threading.ThreadPool : System.Any
{
static field mutex: System.Threading.Mutex
static field waiting: System.Threading.Condition
static field work: System.Queue<func<> : void>
static field workers: i32
static field idle: i32
static field spinning: System.Threading.AtomicI32
// What each worker does: takes work, runs it, again. Before it sleeps it waits a little, giving the processor
// up in turns: work often comes right after.
static method Work() -> void
static method Begin() -> void
// Runs `item` on a pool thread (an error it throws ends the program).
static method QueueUserWorkItem(item: func<> : void) -> void
// How many threads run the work.
static property ThreadCount: i32
}