Class ThreadSafety
Helpers for working with thread safety.
Inheritance
System.Object
ThreadSafety
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Dalamud.Utility
Assembly: Dalamud.dll
Syntax
public static class ThreadSafety
Properties
| Improve this Doc View SourceIsMainThread
Gets a value indicating whether the current thread is the main thread.
Declaration
public static bool IsMainThread { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Methods
| Improve this Doc View SourceAssertMainThread()
Throws an exception when the current thread is not the main thread.
Declaration
public static void AssertMainThread()
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | Thrown when the current thread is not the main thread. |
AssertNotMainThread()
Throws an exception when the current thread is the main thread.
Declaration
public static void AssertNotMainThread()
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | Thrown when the current thread is the main thread. |