1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-26 15:13:16 +00:00

Merge pull request #603 from pepe/evcal-doc

Fix ev/call doc
This commit is contained in:
Calvin Rose 2021-01-20 20:52:23 -06:00 committed by GitHub
commit f7ca6deeb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3148,8 +3148,10 @@
(defn net/close "Alias for ev/close." [stream] (ev/close stream))
(defn ev/call
"Call a function asynchronously. Returns a fiber that is scheduled to "
"run the function."
```
Call a function asynchronously.
Returns a fiber that is scheduled to run the function.
```
[f & args]
(ev/go (fiber/new (fn [&] (f ;args)) :tp)))
@ -3291,7 +3293,7 @@
(if-let [jp (getenv-alias "JANET_PATH")] (setdyn :syspath jp))
(if-let [jp (getenv-alias "JANET_HEADERPATH")] (setdyn :headerpath jp))
(if-let [jprofile (getenv-alias "JANET_PROFILE")] (setdyn :profilepath jprofile))
# Flag handlers
(def handlers
{"h" (fn [&]
@ -3382,7 +3384,7 @@
(file/flush stdout)
(file/read stdin :line buf))
(def env (make-env))
(when-let [profile.janet (dyn :profilepath)]
(when-let [profile.janet (dyn :profilepath)]
(def new-env (dofile profile.janet :exit true))
(merge-module env new-env "" false))
(if *debug* (put env :debug true))