mirror of
https://github.com/Drop-OSS/droplet.git
synced 2026-06-22 04:11:40 +10:00
non blocking async
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@drop/droplet",
|
"name": "@drop/droplet",
|
||||||
"version": "0.4.2",
|
"version": "0.4.3",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"types": "index.d.ts",
|
"types": "index.d.ts",
|
||||||
"napi": {
|
"napi": {
|
||||||
|
|||||||
+1
-1
@@ -37,7 +37,7 @@ pub fn call_alt_thread_func(callback: JsFunction) -> Result<(), Error> {
|
|||||||
})?;
|
})?;
|
||||||
let tsfn = tsfn.clone();
|
let tsfn = tsfn.clone();
|
||||||
thread::spawn(move || {
|
thread::spawn(move || {
|
||||||
tsfn.call(Ok(0), ThreadsafeFunctionCallMode::Blocking);
|
tsfn.call(Ok(0), ThreadsafeFunctionCallMode::NonBlocking);
|
||||||
});
|
});
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user