JanetDocsPlaygroundI'm feeling luckyGitHub sign in

ev/spawn



    macro
    boot.janet on line 3561, column 3

    (ev/spawn & body)

    Run some code in a new fiber. This is shorthand for `(ev/go (fn [] 
    ;body))`.


See also:ev/call1 exampleSign in to add an example
Loading...
(ev/spawn (os/sleep 1) (print "Hard work is done!"))

# prints "Hard work is done!" after one second
# this is the easiest way to put some forms on the event loop
# but do not forget REPL is blocking, for now, so run the example with `janet -e`
pepePlayground