Skip to main content

Class ThreadSafety

Helpers for working with thread safety.

Assembly: Dalamud.dll
View Source
Declaration
public static class ThreadSafety

Properties

IsMainThread

Gets a value indicating whether the current thread is the main thread.

View Source
Declaration
public static bool IsMainThread { get; }

Methods

AssertMainThread()

Throws an exception when the current thread is not the main thread.

View Source
Declaration
public static void AssertMainThread()
Exceptions

System.InvalidOperationException
Thrown when the current thread is not the main thread.

AssertNotMainThread()

Throws an exception when the current thread is the main thread.

View Source
Declaration
public static void AssertNotMainThread()
Exceptions

System.InvalidOperationException
Thrown when the current thread is the main thread.

DebugAssertMainThread()

Dalamud.Utility.ThreadSafety.AssertMainThread(), but only on debug compilation mode.

View Source
Declaration
public static void DebugAssertMainThread()