View source code
Display the source code in std/parallelism.d from which this
page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a
Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
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;
Authors
License
Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.