rune icon indicating copy to clipboard operation
rune copied to clipboard

async paramters error

Open zhuchuanjing opened this issue 9 months ago • 1 comments

pub async fn asyn_call(&self, name: &str, func: &str, obj: Value) -> Result<Value> {
    let vm = self.vm_with_unit(name)?;
    Ok(vm.send_execute([func], (obj)).unwrap().async_complete().await.into_result()?)
}

this async function can't be compiled, the error is "rustc: NonNull<rune::runtime::shared::SharedBox<AnyObj>> cannot be sent between threads safely within rune::Value, the trait Send is not implemented for NonNull<rune::runtime::shared::SharedBox<AnyObj>>, which is required by rune::Value: Send"

zhuchuanjing avatar Feb 11 '25 15:02 zhuchuanjing