rune
rune copied to clipboard
async paramters error
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"