gcExclusive

A new exclusive reference to a payload. Allocated on the GC to make sure its lifetime is infinite and therefore safe to pass to other threads.

This function sets the passed-in payload to payload.init to make sure that no references to it can be unsafely used.

  1. auto gcExclusive(A args)
  2. auto gcExclusive(T payload)
    gcExclusive
    (
    T
    )
    (
    ref T payload
    )
    if (
    !from!"std.traits".hasUnsharedAliasing!T
    )

Meta