node: extract node env initialization out of process initialization#980
node: extract node env initialization out of process initialization#980petkaantonov wants to merge 1 commit intonodejs:v1.xfrom
Conversation
8a90f3f to
31313f1
Compare
There was a problem hiding this comment.
If StartNodeInstance() is not used elsewhere, it should be static or inline (they amount to the same thing, non-external linkage.)
I'm not sure what comment that was but it sounds reasonable. |
|
Why do we need another class for this? Isn't |
31313f1 to
f234211
Compare
|
Addressed @bnoordhuis comments, I also added an internal
Instances of this class will be the data argument passed to |
There was a problem hiding this comment.
Looking at this again, I think it should be left to the caller to clean up the uv_loop_t. Calling uv_loop_delete() is not safe because we don't know if the loop was created with uv_loop_new() or uv_loop_init().
|
LGTM with comments. |
e167887 to
411d78f
Compare
|
Addressed comments, rebased to v1.x and squashed |
|
ping |
|
LGTM apart from a style nit. Land at will. |
411d78f to
dfe0b40
Compare
PR-URL: #980 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
|
Merged in 4ae64b2. Thanks! |
This will enable implementing a worker class that is backed by a thread instead of a separate process.
/cc @bnoordhuis
P.S. I saw your todo comments about using uv_default_loop, I was thinking why not have the main thread use the default loop and workers use their own loops?