MicroThreadLocal<T> Class
Namespace: Stride.Core.MicroThreadingAssembly: Stride.Core.MicroThreading.dll
Provides microthread-local storage of data.
System.Object →
MicroThreadLocal<T>
Derived from MicroThreadLocal<T>:
public class MicroThreadLocal<T>
where T : class
Type Parameters
Name | Description |
---|---|
T | Type of data stored. |
Name | Description | |
---|---|---|
Constructors | ||
MicroThreadLocal() | Initializes a new instance of the MicroThreadLocal<T> class. |
|
MicroThreadLocal(Func<T>) | Initializes a new instance of the MicroThreadLocal<T> class. |
|
Properties | ||
IsValueCreated | ||
Value | Gets or sets the value for the current microthread. |
|
Methods | ||
ClearValue() |
Constructors
MicroThreadLocal()
Initializes a new instance of the MicroThreadLocal<T> class.
public MicroThreadLocal()
MicroThreadLocal(Func<T>)
Initializes a new instance of the MicroThreadLocal<T> class.
public MicroThreadLocal(Func<T> valueFactory)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T> | valueFactory | The value factory invoked to create a value when Value is retrieved before having been previously initialized. |
Properties
IsValueCreated
public bool IsValueCreated { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Value
Gets or sets the value for the current microthread.
public T Value { get; set; }
Property Value
Type | Description |
---|---|
T | The value for the current microthread. |
Methods
ClearValue()
public void ClearValue()