JanetDocsI'm feeling luckyGitHub sign in

ev/chan



    cfunction

    (ev/chan &opt capacity)

    Create a new channel. capacity is the number of values to queue
    before blocking writers, defaults to 0 if not provided. Returns a new
    channel.


1 exampleSign in to add an example
Loading...
(def chan (ev/chan))
(def f (ev/go (coro (yield "world")) nil chan))
(def [sig fib] (ev/take chan))
(pp sig) # => prints :yield
(pp (fiber/last-value fib)) # => prints world
pepe