Missed some sources to add a TODO mark about asynctify

This commit is contained in:
ptitSeb
2023-01-04 18:21:17 +01:00
parent a050376636
commit 212f836e30
3 changed files with 3 additions and 1 deletions

View File

@@ -96,7 +96,6 @@ macro_rules! impl_native_traits {
};
let mut r;
//TODO: This loop is needed for async. It will be refactor with https://github.com/wasmerio/wasmer/issues/3451
loop {
r = unsafe {
wasmer_vm::wasmer_call_trampoline(
@@ -188,6 +187,7 @@ macro_rules! impl_native_traits {
};
let store_mut = store.as_store_mut();
if let Some(callback) = store_mut.inner.on_called.take() {
//TODO: OnCalledAction is needed for async. It will be refactor with https://github.com/wasmerio/wasmer/issues/3451
match callback(store_mut) {
Ok(wasmer_types::OnCalledAction::InvokeAgain) => { continue; }
Ok(wasmer_types::OnCalledAction::Finish) => { break; }

View File

@@ -327,6 +327,7 @@ impl<'a> StoreMut<'a> {
Self { inner: &mut *raw }
}
//TODO: OnCalledAction is needed for async. It will be refactor with https://github.com/wasmerio/wasmer/issues/3451
/// Sets the unwind callback which will be invoked when the call finishes
pub fn on_called<F>(&mut self, callback: F)
where