-
Notifications
You must be signed in to change notification settings - Fork 461
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
src: add AsyncWorker destruction suppression #407
src: add AsyncWorker destruction suppression #407
Conversation
@ebickle PTAL |
bd39b76
to
d1e9315
Compare
Whoops! I accidentally closed this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LGTM |
@gabrielschulhof Does it fail on every version of Node.js or one in the specific? |
@NickNaso all. |
OK. This is weird. It looks like OSX merges data symbols from different .node files!
The location of |
New CI:
|
Still dies on OSX 😕 |
03b319b
to
7679068
Compare
CI:
Gonna add the rest if the first one is OK 🙂 |
7679068
to
3b3a482
Compare
@mhdawson @NickNaso the moral of the story is that we need to add the condition ['OS!="windows"', {
'cflags+': ['-fvisibility=hidden'],
'xcode_settings': {
'OTHER_CFLAGS': ['-fvisibility=hidden']
}
}] to Thus, could you please have another look at the PR? The implementation hasn't changed, but I cleaned up the test a little. |
Made another small change, so here's a new set of CI:
|
Add method `SuppressDestruct()` to `AsyncWorker`, which will cause an instance of the class to remain allocated even after the `OnOK` callback fires. Such an instance must be explicitly `delete`-ed from user code. Re: nodejs#231 Re: nodejs/abi-stable-node#353
3b3a482
to
1cdfc87
Compare
Argh! Need to flip the rule to apply only to OSX. Here we go again:
I'll start the other jobs once one completes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Discussed in most recent N-API team meetings. My understanding is that we are going to try out some other options so will mark as request changes until we do that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed in most recent N-API team meetings. My understanding is that we are going to try out some other options so will mark as request changes until we do that.
@mhdawson @NickNaso since we have sufficient approval of nodejs/node-gyp#1689 (1 collaborator approval + 7 days) and since it introduces the same change as this PR (to add We should also document that we recommend that folks add |
@gabrielschulhof I'm ok with your idea and I think that we need to update the documentation in the setup section https://github.com/nodejs/node-addon-api/blob/master/doc/setup.md#installation-and-usage. |
@gabrielschulhof sounds good to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Add method `SuppressDestruct()` to `AsyncWorker`, which will cause an instance of the class to remain allocated even after the `OnOK` callback fires. Such an instance must be explicitly `delete`-ed from user code. Re: #231 Re: nodejs/abi-stable-node#353 PR-URL: #407 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: NickNaso <[email protected]>
Landed as b0f6b60 |
Add method `SuppressDestruct()` to `AsyncWorker`, which will cause an instance of the class to remain allocated even after the `OnOK` callback fires. Such an instance must be explicitly `delete`-ed from user code. Re: nodejs/node-addon-api#231 Re: nodejs/abi-stable-node#353 PR-URL: nodejs/node-addon-api#407 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: NickNaso <[email protected]>
Add method `SuppressDestruct()` to `AsyncWorker`, which will cause an instance of the class to remain allocated even after the `OnOK` callback fires. Such an instance must be explicitly `delete`-ed from user code. Re: nodejs/node-addon-api#231 Re: nodejs/abi-stable-node#353 PR-URL: nodejs/node-addon-api#407 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: NickNaso <[email protected]>
Add method `SuppressDestruct()` to `AsyncWorker`, which will cause an instance of the class to remain allocated even after the `OnOK` callback fires. Such an instance must be explicitly `delete`-ed from user code. Re: nodejs/node-addon-api#231 Re: nodejs/abi-stable-node#353 PR-URL: nodejs/node-addon-api#407 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: NickNaso <[email protected]>
Add method `SuppressDestruct()` to `AsyncWorker`, which will cause an instance of the class to remain allocated even after the `OnOK` callback fires. Such an instance must be explicitly `delete`-ed from user code. Re: nodejs/node-addon-api#231 Re: nodejs/abi-stable-node#353 PR-URL: nodejs/node-addon-api#407 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: NickNaso <[email protected]>
Add method
SuppressDestruct()
toAsyncWorker
, which will cause aninstance of the class to remain allocated even after the
OnOK
callback fires. Such an instance must be explicitly
delete
-ed fromuser code.
Re: #231
Re: nodejs/abi-stable-node#353