fix(napi): callback in execute_tokio_future does not need to be Send (#1917)

The resolver does not need to be `Send` or `Sync`, because it's assumed to be called from the same thread that the JavaScript thread is running on.
This commit is contained in:
LongYinan 2024-01-26 10:27:17 +08:00 committed by GitHub
parent 80f37eeb6a
commit 134707ef1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1087,7 +1087,7 @@ impl Env {
T: 'static + Send,
V: 'static + ToNapiValue,
F: 'static + Send + Future<Output = Result<T>>,
R: 'static + Send + FnOnce(&mut Env, T) -> Result<V>,
R: 'static + FnOnce(&mut Env, T) -> Result<V>,
>(
&self,
fut: F,