Thread.this

Create a thread with user data. Thread is not created until start has been called.

  1. this(ThreadDelegate callback, size_t stackSize)
  2. this(ThreadDelegateUser callback, size_t stackSize, void* userData)
    struct Thread
    nothrow @nogc
    this
    (,
    size_t stackSize = 0
    ,
    void* userData = null
    )

Parameters

callback ThreadDelegateUser

The delegate that will be called by the thread.

stackSize size_t

The thread stack size in bytes. 0 for default size.

userData void*

a pointer to be passed to thread delegate

Warning: It is STRONGLY ADVISED to pass a class member delegate (not a struct member delegate) to have additional context. Passing struct method delegates are currently UNSUPPORTED.

Meta