Skip to content

Document fiber user signals #232

@pnelson

Description

@pnelson

fiber/status may return :user(0-7) to indicate that the fiber is suspended by a user signal.

defer will also run form if a user signal 0-4 is received, I assume within the fiber it is being run in.

The signal function appears to be used to send user signals. The function documentation should probably make mention of "user" but I think the example provided on Zulip would make a great addition to the Fiber Overview page:

(defer (pp :hello) (signal :user1 :smile) (pp :oops))
:hello
user1: smile
  in signal [src/core/corelib.c] on line 701
  in defer [repl] on line 2, column 20
  in thunk [repl] (tail call) on line 2, column 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions