JanetDocsI'm feeling luckyGithub sign in

fiber/new



    cfunction

    (fiber/new func &opt sigmask)
    
    Create a new fiber with function body func. Can optionally take a set
    of signals to block from the current parent fiber when called. The mask
    is specified as a keyword where each character is used to indicate a
    signal to block. The default sigmask is :y. For example,
    
      (fiber/new myfun :e123)
    
    blocks error signals and user signals 1, 2 and 3. The signals are as
    follows:
    
      a - block all signals
      d - block debug signals
      e - block error signals
      t - block termination signals: error + user[0-4]
      u - block user signals
      y - block yield signals
      0-9 - block a specific user signal
    
    The sigmask argument also can take environment flags. If any mutually
    exclusive flags are present, the last flag takes precedence.
    
      i - inherit the environment from the current fiber
      p - the environment table's prototype is the current environment
    table


0 examplesSign in to add an example
Loading...