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

src: export node_is_initialized #225

Closed
wants to merge 1 commit into from
Closed

src: export node_is_initialized #225

wants to merge 1 commit into from

Conversation

zcbenz
Copy link
Contributor

@zcbenz zcbenz commented Dec 31, 2014

This gives users that using io.js as external library a chance to set node_is_initialized to true, otherwise it would impossible for them to use dynamic native modules.

@bnoordhuis
Copy link
Member

I don't really want to export a global (before you ask: no_deprecation was a bad idea, IMO.) A function might be acceptable but it would be even better if node_is_initialized got eradicated somehow.

@zcbenz
Copy link
Contributor Author

zcbenz commented Dec 31, 2014

How about putting node_is_initialized = true at the end of node::Init instead of putting it in node::Start? So we don't need to export node_is_initialized and users using node::Init for initialization don't have to hack on Node.

@piscisaureus
Copy link
Contributor

How about putting node_is_initialized = true at the end of node::Init instead of putting it in node::Start?

That seems reasonable to me.

@zcbenz
Copy link
Contributor Author

zcbenz commented Jan 12, 2015

I have updated the patch.

@cjihrig
Copy link
Contributor

cjihrig commented Jan 20, 2015

@piscisaureus LGTY?

@bnoordhuis
Copy link
Member

LGTM but a comment explaining why node_is_initialized is set where it's set makes it less likely to break in a future refactoring.

This can make node_is_initialized correctly set to true for applications
that use node::Init to embed iojs.
@zcbenz
Copy link
Contributor Author

zcbenz commented Jan 20, 2015

I have added some comments in the code to make things clear.

bnoordhuis pushed a commit that referenced this pull request Jan 20, 2015
This can make node_is_initialized correctly set to true for applications
that use node::Init to embed iojs.

PR-URL: #225
Reviewed-By: Ben Noordhuis <[email protected]>
@bnoordhuis
Copy link
Member

Thanks Cheng, landed in 22e1aea.

@bnoordhuis bnoordhuis closed this Jan 20, 2015
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.

4 participants