class · System.Threading
Thread
public class System.Threading.Thread : System.Any
A thread of its own running a function: new Thread(() => …), Start, Join.
- Tipo
- class
- Espacio de nombres
- System.Threading
- Ensamblado
- System.Core
- Acceso
- public, final
- Archivo fuente
Threading.ant
Herencia
- Clases base
-
AnyThread
Constructores
constructor Thread(body: func<> : void)
#
Propiedades
Started and not finished.
Its number (0 until it runs): the main thread's is 1.
The number of the thread that asks.
Métodos
method Start() -> void
#
Starts the thread (once).
method Join() -> void
#
Waits until the thread has finished.
Waits at most milliseconds: whether the thread has finished.
Sleeps milliseconds (other threads run).
static method Yield() -> void
#
Lets another thread run.
Waits a little without giving the processor up (in a loop that waits for another thread).
Miembros privados e internos (12)
field body: func<> : void
#
0 not started, 1 started, 2 joined.
field done: System.Threading.AtomicI32
#
static method YieldNative() -> void
#
static method Misused(what: System.String<u8>) -> void
#
method Run() -> void
#
What the new thread runs: the function, then it says it is done.
Miembros heredados (5)
GetTypemétodo de AnyUndescribedmétodo de AnyToStringmétodo de AnyHashmétodo de Anydestroymétodo de Any
Código fuente
Thread en Larva HIR, descompilado a partir de su Larva HIR.
// A thread of its own running a function: `new Thread(() => …)`, Start, Join.
public class System.Threading.Thread : System.Any
{
field body: func<> : void
field handle: i64
// 0 not started, 1 started, 2 joined.
field state: i32
field done: System.Threading.AtomicI32
field number: i32
static method StartNative(body: func<> : void) -> i64
static method JoinNative(handle: i64, milliseconds: i64) -> i64
static method CurrentNative() -> i64
static method YieldNative() -> void
static method SleepFor(milliseconds: i64) -> void
static method Misused(what: System.String<u8>) -> void
// What the new thread runs: the function, then it says it is done.
method Run() -> void
constructor Thread(body: func<> : void)
// Starts the thread (once).
method Start() -> void
// Waits until the thread has finished.
method Join() -> void
// Waits at most `milliseconds`: whether the thread has finished.
method Join(milliseconds: i32) -> bool
// Sleeps `milliseconds` (other threads run).
static method Sleep(milliseconds: i32) -> void
// Lets another thread run.
static method Yield() -> void
// Waits a little without giving the processor up (in a loop that waits for another thread).
static method SpinWait(iterations: i32) -> void
// Started and not finished.
property IsAlive: bool
// Its number (0 until it runs): the main thread's is 1.
property ManagedThreadId: i32
// The number of the thread that asks.
static property CurrentId: i32
}