Trait jlrs::extensions::multitask::call_async::CallAsync[][src]

pub trait CallAsync<'data>: Call<'data> {
    unsafe fn call_async<'frame, 'value, 'life0, 'async_trait, V>(
        self,
        frame: &'life0 mut AsyncGcFrame<'frame>,
        args: V
    ) -> Pin<Box<dyn Future<Output = JlrsResult<JuliaResult<'frame, 'data>>> + 'async_trait>>
    where
        V: AsMut<[Value<'value, 'data>]>,
        'frame: 'async_trait,
        'value: 'async_trait,
        V: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

This trait extends Call and adds another way to call a Julia function, call_async. It’s implemented by Value, Function and WithKeywords.

Required methods

Call a function on another thread with the given arguments. This method uses Threads.@spawn to call the given function on another thread but return immediately. While awaiting the result the async runtime can work on other tasks, the current task resumes after the function call on the other thread completes (either by returning or throwing).

Implementors