mirror of
https://github.com/janet-lang/janet
synced 2025-11-07 19:13:02 +00:00
Fix threaded supervisor channels - Fix #766
Some pointer casting with abstract types was incorrect, resulting in strange behavior when trying to use supervisor channels that were threaded. This fix also adds the ability to supply a supervisor channel directly when creating a thread.
This commit is contained in:
@@ -3370,9 +3370,9 @@
|
||||
~(,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 ``
|
||||
``Run some code in a new thread. Like `ev/do-thread`, but returns immediately with a fiber.``
|
||||
[& body]
|
||||
~(,ev/thread (fiber/new (fn _thread [&] ,;body) :t) :n))
|
||||
~(,ev/thread (fiber/new (fn _thread [&] ,;body) :t) nil :n))
|
||||
|
||||
(defmacro ev/with-deadline
|
||||
`Run a body of code with a deadline, such that if the code does not complete before
|
||||
|
||||
Reference in New Issue
Block a user