Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v16.x backport] node-api: faster threadsafe_function #38547

Closed

Conversation

indutny
Copy link
Member

@indutny indutny commented May 5, 2021

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: #38506
Reviewed-By: Anna Henningsen anna@addaleax.net
Reviewed-By: Rich Trott rtrott@gmail.com
Reviewed-By: James M Snell jasnell@gmail.com


Backport-PR-URL: #38506

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: nodejs#38506
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@indutny indutny requested a review from addaleax May 5, 2021 07:24
@github-actions github-actions bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. v16.x labels May 5, 2021
@targos
Copy link
Member

targos commented May 5, 2021

Did you have to fix conflicts ? If not, we will cherry pick the commit by default when we prepare the next release

@aduh95 aduh95 changed the title node-api: faster threadsafe_function [v16.x backport] node-api: faster threadsafe_function May 5, 2021
@indutny
Copy link
Member Author

indutny commented May 6, 2021

Ah, no conflicts. Closing then.

@indutny indutny closed this May 6, 2021
@indutny indutny deleted the backport/gh-38506-into-16 branch May 6, 2021 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants