Fix some issues and improve channel closing.

Still not fully working, seems to be deadlock/channel issue when
sending events between threads.
This commit is contained in:
Calvin Rose
2021-08-15 13:14:33 -05:00
parent 037215f7c4
commit 97e5117a3f
4 changed files with 71 additions and 42 deletions
+5
View File
@@ -3369,6 +3369,11 @@
[& body]
~(,ev/thread (fiber/new (fn _thread [&] ,;body) :t)))
(defmacro ev/spawn-thread
``Run some code in a new thread. Returns a fiber that can be ``
[& body]
~(,ev/thread (fiber/new (fn _thread [&] ,;body) :t) :n))
(defmacro ev/with-deadline
`Run a body of code with a deadline, such that if the code does not complete before
the deadline is up, it will be canceled.`