Skip to content

[v8.x-backport] n-api: mark thread-safe function as stable - #25648

Closed
gabrielschulhof wants to merge 2 commits into
nodejs:v8.x-stagingfrom
gabrielschulhof:un-experimental-tsfn-v8.x
Closed

[v8.x-backport] n-api: mark thread-safe function as stable#25648
gabrielschulhof wants to merge 2 commits into
nodejs:v8.x-stagingfrom
gabrielschulhof:un-experimental-tsfn-v8.x

Conversation

@gabrielschulhof

Copy link
Copy Markdown
Contributor

Remove NAPI_EXPERIMENTAL guard from around N-API thread-safe function
APIs.

Unlike in later versions of Node.js in this version the NAPI_EXPERIMENTAL guard cannot be replaced with #if NAPI_VERSION >= 4 because the N-API versioning commit (8476053) was not backported. So, the only option is to drop the guard.

Fixes: #24249
PR-URL: #25556

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. node-api Issues and PRs related to the Node-API. v8.x labels Jan 22, 2019
@gabrielschulhof
gabrielschulhofforce-pushed the un-experimental-tsfn-v8.x branch from d4728e7 to ca8a70eCompareJanuary 22, 2019 22:31
@gabrielschulhofgabrielschulhof added the semver-minor PRs that contain new features and should be released in the next minor version. label Jan 22, 2019
Comment threadsrc/node_api.h Outdated
@gabrielschulhof
gabrielschulhofforce-pushed the un-experimental-tsfn-v8.x branch from ca8a70e to 94a1637CompareJanuary 25, 2019 19:24
@gabrielschulhofgabrielschulhof changed the title n-api: mark thread-safe function as stable[v8.x-backport] n-api: mark thread-safe function as stableJan 25, 2019
@gabrielschulhof

Copy link
Copy Markdown
ContributorAuthor

@gabrielschulhof

Copy link
Copy Markdown
ContributorAuthor

@mhdawson I have now backported the commit that introduces the guards.

Comment threaddoc/api/n-api.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an aside do we need to update this table, at least in master?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think we do.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mhdawsonmhdawson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

kfarnungand others added 2 commits March 4, 2019 10:29
* Move `napi_get_uv_event_loop` into the `NAPI_VERSION >= 2` section
* Move `napi_open_callback_scope`, `napi_close_callback_scope`,
`napi_fatal_exception`, `napi_add_env_cleanup_hook`, and
`napi_remove_env_cleanup_hook` into the `NAPI_VERSION >= 3` section
* Added a missing `added` property to `napi_get_uv_event_loop` in the
docs
* Added a `napiVersion` property to the docs and updated the parser and
generator to use it.
* Added usage documentation
PR-URL: nodejs#19962
Backport-PR-URL: nodejs#25648
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Fixes: nodejs#24249
PR-URL: nodejs#25556
Backport-PR-URL: nodejs#25633
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@gabrielschulhof
gabrielschulhofforce-pushed the un-experimental-tsfn-v8.x branch from 94a1637 to ad9c154CompareMarch 4, 2019 18:29
@gabrielschulhof

Copy link
Copy Markdown
ContributorAuthor

Weird ... github said there was a conflict in 4 different files, but I rebased and there was no conflict at all.

@gabrielschulhof

Copy link
Copy Markdown
ContributorAuthor

@gabrielschulhof

Copy link
Copy Markdown
ContributorAuthor

BethGriggs pushed a commit that referenced this pull request Mar 20, 2019
* Move `napi_get_uv_event_loop` into the `NAPI_VERSION >= 2` section
* Move `napi_open_callback_scope`, `napi_close_callback_scope`,
`napi_fatal_exception`, `napi_add_env_cleanup_hook`, and
`napi_remove_env_cleanup_hook` into the `NAPI_VERSION >= 3` section
* Added a missing `added` property to `napi_get_uv_event_loop` in the
docs
* Added a `napiVersion` property to the docs and updated the parser and
generator to use it.
* Added usage documentation
PR-URL: #19962
Backport-PR-URL: #25648
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
BethGriggs pushed a commit that referenced this pull request Mar 20, 2019
Fixes: #24249
PR-URL: #25556
Backport-PR-URL: #25648
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@BethGriggs

Copy link
Copy Markdown
Member

Landed on v8.x-staging

@gabrielschulhof
gabrielschulhof deleted the un-experimental-tsfn-v8.x branch June 14, 2019 23:51
Sign up for freeto 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++.node-apiIssues and PRs related to the Node-API.semver-minorPRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@gabrielschulhof@nodejs-github-bot@BethGriggs@mhdawson@kfarnung