[−][src]Module jlrs::multitask
Run Julia in a separate thread and execute tasks in parallel.
While access to Julia with the C API is entirely single-threaded, it's possible to offload a
function call to another thread by using Base.Threads.@spawn
. The experimental async runtime
offered by jlrs combines this feature with Rust's async/.await syntax.
In order to use the async runtime, Julia must be started with more than one thread by setting
the JULIA_NUM_THREADS
environment variable. In order to create tasks that can be executed
you must implement the JuliaTask
trait.
Structs
AsyncJulia | A handle to the async runtime. It can be used to include files and create new tasks. The
runtime shuts down when the last handle is dropped. The two generic type parameters |