Threads

Summary

Definition

Namespace: SDT4.Managed.Core
Assembly: SDT4.Managed.Core.dll

static class Threads
Inheritance:

Object ➔ Threads

Implements:


Fields

Name Type Description

Properties

Name Type Description
public static get; protected static set; MasterThreadId Int32 The managed master thread ID.
public static get; IsCurrentMasterThread Boolean States if the current executing thread is the master thread.

Methods

public static Void AssertMasterThread()

Summary: Asserts that the current thread is the master thread.

Remarks:

Info

Debug only: This method is stripped in release builds


public static Void AssertMatchThread(Int32 target)

Summary: Asserts that the current thread matches the target thread ID.

Remarks:

Info

Debug only: This method is stripped in release builds

Parameters:


public static Void RunLater(ThreadStart thread)

Summary: Queues a subroutine to be executed on the master thread during the next engine tick.

Parameters:


public static Void RunOnMaster(ThreadStart thread)

Summary: Executes a subroutine on the master thread. If already on the master thread, executes immediately (blocking).

Parameters:


public static Task RunLaterAsync(Action action)

Summary: Queues a subroutine to be executed on the master thread during the next engine tick and allows you to await its completion.

Parameters:

Returns:


public static Task<T> RunLaterAsync<T>(Func<T> function)

Summary: Queues a subroutine to be executed on the master thread during the next engine tick, awaits its completion, and returns the result.

Parameters:

Returns: