Skip to content

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

@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 <info@bnoordhuis.nl>
@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

4 participants