Thread.UnsafeStart Method

Definition

Overloads

UnsafeStart(Object)

Causes the operating system to change the state of the current instance to Running, and optionally supplies an object containing data to be used by the method the thread executes.

UnsafeStart()

Causes the operating system to change the state of the current instance to Running.

UnsafeStart(Object)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

Causes the operating system to change the state of the current instance to Running, and optionally supplies an object containing data to be used by the method the thread executes.

[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public void UnsafeStart (object? parameter);

Parameters

parameter
Object

An object that contains data to be used by the method the thread executes.

Attributes

Exceptions

The thread has already been started.

There is not enough memory available to start this thread.

This thread was created using a ThreadStart delegate instead of a ParameterizedThreadStart delegate.

Remarks

Unlike Start(Object), which captures the current ExecutionContext and uses that context to invoke the thread's delegate, UnsafeStart(Object) explicitly avoids capturing the current context and flowing it to the invocation.

Applies to

.NET 9 және басқа нұсқалар
Өнім Нұсқалар
.NET 6, 7, 8, 9

UnsafeStart()

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

Causes the operating system to change the state of the current instance to Running.

[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public void UnsafeStart ();
Attributes

Exceptions

The thread has already been started.

There is not enough memory available to start this thread.

Remarks

Unlike Start(Object), which captures the current ExecutionContext and uses that context to invoke the thread's delegate, UnsafeStart(Object) explicitly avoids capturing the current context and flowing it to the invocation.

Applies to

.NET 9 және басқа нұсқалар
Өнім Нұсқалар
.NET 6, 7, 8, 9