Skip to content

doc: update website N-API references to Node-API#178

Merged
mhdawson merged 3 commits into
nodejs:mainfrom
xozitu:n-api-to-node-api
Mar 26, 2021
Merged

doc: update website N-API references to Node-API#178
mhdawson merged 3 commits into
nodejs:mainfrom
xozitu:n-api-to-node-api

Conversation

@jschlight
Copy link
Copy Markdown
Contributor

This PR updates all of the references in the tutorial website from N-API to Node-API. There are also some other minor cleanups of broken links and typos.

Node will run the code of the `Execute` method in a thread separate from the thread running Node's main event loop. The `Execute` method _has no access_ to any part of the Node-API environment. For this reason, the `runTime` input value was stored by the constructor as a private data member.

Node will run the code of the `Execute` method in a thread separate from the thread running Node's main event loop. The `Execute` method _has no access_ to any part of the N-API environment. For this reason, the `runTime` input value was stored by the constructor as a private data member.
In this implementation, the `Execute` method simply waits the number of seconds specified earlier by `runTime`. This is where the long running code goes in a real implementation. To demonstrate how error handling works, this `Execute` method declares an error when requested to run 4 seconds.
Copy link
Copy Markdown
Contributor Author

@jschlight jschlight Mar 18, 2021

Choose a reason for hiding this comment

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

I apologize for the mess here. I accidentally engaged my Markdown linter that removed spaces at the ends of the lines which has completely confused the comparator. 😳

Copy link
Copy Markdown
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

@mhdawson mhdawson merged commit 20a4854 into nodejs:main Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants