std.parallelism.TaskPool.WorkerLocalStorage.get
- multiple declarations
Function TaskPool.WorkerLocalStorage.get
Get the current thread's instance. Returns by ref.
Note that calling get
from any thread
outside the TaskPool
that created this instance will return the
same reference, so an instance of worker-local storage should only be
accessed from one thread outside the pool that created it. If this
rule is violated, undefined behavior will result.
ref auto get(Qualified)() @property;
If assertions are enabled and toRange
has been called, then this
WorkerLocalStorage instance is no longer worker-local and an assertion
failure will result when calling this method. This is not checked
when assertions are disabled for performance reasons.
Function TaskPool.WorkerLocalStorage.get
Assign a value to the current thread's instance. This function has the same caveats as its overload.
void get
(
T val
) @property;