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
Any ThreadPool

Propiedades

static property ThreadCount: i32
#

static read-only

How many threads run the work.

Métodos

static method QueueUserWorkItem(item: func<> : void) -> void
#

static

Runs item on a pool thread (an error it throws ends the program).

Miembros privados e internos (8)

static field mutex: System.Threading.Mutex
#

private static

static field waiting: System.Threading.Condition
#

private static

static field work: System.Queue<func<> : void>
#

private static

static field workers: i32
#

private static

static field idle: i32
#

private static

static field spinning: System.Threading.AtomicI32
#

private static

static method Work() -> void
#

private static

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
#

private static

Miembros heredados (5)

Código fuente

ThreadPool en Larva HIR, descompilado a partir de su Larva HIR.

System.Threading.ThreadPool.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
}
Esc