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.
- Tipo
- class
- Espacio de nombres
- System.Threading
- Ensamblado
- System.Core
- Acceso
- public, static, abstract
- Archivo fuente
Threading.ant
Herencia
- Clases base
-
AnyThreadPool
Propiedades
Métodos
static method QueueUserWorkItem(item: func<> : void) -> void
#
Runs item on a pool thread (an error it throws ends the program).
Miembros privados e internos (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
#
Miembros heredados (5)
GetTypemétodo de AnyUndescribedmétodo de AnyToStringmétodo de AnyHashmétodo de Anydestroymétodo de Any
Código fuente
ThreadPool en Larva HIR, descompilado a partir de su 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
}