AcquiredSingleton.acquire

Gets the singleton T instance.

  1. Elem acquire(Elem new_t)
  2. Elem acquire(Elem new_t, void delegate(Elem) reset)
    struct AcquiredSingleton(T)
    acquire
    (
    lazy Elem new_t
    ,
    scope void delegate reset
    )

Parameters

new_t Elem

lazily initialised new resource

reset void delegate

delegate to call on the singleton instance when it is first acquired by this execution context from the pool. Should perform any logic required to reset the instance to its initial state

Return Value

Type: Elem

singleton T instance

Meta