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

Improve TickEventLoop() #46

Merged
merged 3 commits into from
Jan 30, 2018
Merged

Conversation

justus-hildebrand
Copy link
Collaborator

Introduce early check for uv_loop_alive() and small refactoring

From what I was able to find, this was the only necessary change to our TickEventLoop() function. See #27 for an explanation why I think the change was necessary.

fixes #27

Copy link
Collaborator

@luminosuslight luminosuslight left a comment

Choose a reason for hiding this comment

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

Seems reasonable 👍 (except for two style issues)

src/node.cc Outdated
@@ -4803,18 +4803,20 @@ inline static bool TickEventLoop(Environment & env) {
bool more = false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

more is not used anymore, right?

src/node.cc Outdated
more = uv_loop_alive(env.event_loop());
if (more)
return more;
if (uv_loop_alive(env.event_loop()))
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should either add curly braces around the return statement here or remove them in line 4806 to be consistent.

@justus-hildebrand
Copy link
Collaborator Author

Updated. @luminosuslight feel free to approve and merge!

@luminosuslight luminosuslight merged commit ecee92a into node_lib Jan 30, 2018
@luminosuslight luminosuslight deleted the tick-event-loop-early-exit branch January 30, 2018 15:03
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.

2 participants