Skip to content

src: export node_is_initialized#225

Closed
zcbenz wants to merge 1 commit into
nodejs:v1.xfrom
zcbenz:export-node_is_initialized
Closed

src: export node_is_initialized#225
zcbenz wants to merge 1 commit into
nodejs:v1.xfrom
zcbenz:export-node_is_initialized

Conversation

@zcbenz

@zcbenz zcbenz commented Dec 31, 2014

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

zcbenz commented Dec 31, 2014

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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

zcbenz commented Jan 12, 2015

Copy link
Copy Markdown
Contributor Author

I have updated the patch.

@cjihrig

cjihrig commented Jan 20, 2015

Copy link
Copy Markdown
Contributor

@piscisaureus LGTY?

@bnoordhuis

Copy link
Copy Markdown
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

zcbenz commented Jan 20, 2015

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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