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.

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.

  1. ref get()
    struct WorkerLocalStorage(T)
    ref @property
    get
    (
    this Qualified
    )
    ()
  2. void get(T val)

Meta