Fiber.this

Initializes a fiber object which is associated with a dynamic D function.

  1. this(void function() fn, size_t sz = PAGESIZE * defaultStackPages, size_t guardPageSize = PAGESIZE)
  2. this(void delegate() dg, size_t sz = PAGESIZE * defaultStackPages, size_t guardPageSize = PAGESIZE)
    class Fiber
    this
    nothrow
    (
    void delegate(
    )
    dg
    ,
    size_t sz = PAGESIZE * defaultStackPages
    ,
    size_t guardPageSize = PAGESIZE
    )
    in { assert (dg); }

Parameters

dg
Type: void delegate(
)

The fiber function.

sz
Type: size_t

The stack size for this fiber.

guardPageSize
Type: size_t

size of the guard page to trap fiber's stack overflows. Beware that using this will increase the number of mmaped regions on platforms using mmap so an OS-imposed limit may be hit.

In: dg must not be null.

Suggestion Box / Bug Report