Commit 7abc7e45 authored by Fedor Indutny's avatar Fedor Indutny
Browse files

node-api: faster threadsafe_function

Invoke threadsafe_function during the same tick and avoid marshalling
costs between threads and/or churning event loop if either:

1. There's a queued call already
2. `Push()` is called while the main thread was running
   threadsafe_function

PR-URL: https://github.com/nodejs/node/pull/38506


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 96431282
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment