mirror of
https://github.com/janet-lang/janet
synced 2025-11-11 13:03:08 +00:00
Move read/write functions into ev.c from net.c
This code can also be used for non-network streams.
This commit is contained in:
@@ -2733,6 +2733,12 @@
|
||||
(if (dyn sym)
|
||||
form))
|
||||
|
||||
(guarddef ev/go
|
||||
(defmacro ev/spawn
|
||||
"Run some code in a new fiber. This is shorthand for (ev/call (fn [] ;body))."
|
||||
[& body]
|
||||
~(,ev/call (fn [] ,;body))))
|
||||
|
||||
(guarddef net/listen
|
||||
(defn net/server
|
||||
"Start a server asynchornously with net/listen and net/accept-loop. Returns the new server stream."
|
||||
|
||||
Reference in New Issue
Block a user