Open lePerdu opened 4 years ago
I had some plans that Function
could instead hold the Mutex
lock that protects the vm execution which would then require &mut
. This would let the function be called multiple times withot reqaquiring the lock on every call. Never got around to it so atm it doesn't do anything.
You should still be able Clone
the Function
values though to share them and call them from multiple places. Not sure yet if I should fall back to making them &
.
Is there a reason that
vm::api::Function::call
(andcall_async
andcall_fast_async
) take a mutable reference toself
? The code compiles fine if they take immutable references.