-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
lib: document nextTick queue internals #19469
Conversation
Make this code (a bit more) comprehensible by adding some internals docs. It has diagrams and everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
lib/internal/process/next_tick.js
Outdated
// Adding a value means moving `top` forward by one, removing means | ||
// moving `bottom` forward by one. | ||
// | ||
// We let `bottom` and `top` wrap around, so when `top` is conceptual.y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo "conceptual.y".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done! :)
(yes, I approved it twice... I really like this) |
} else { | ||
// If the head is empty, that means that it was the only fixed-sized | ||
// queue in existence. | ||
DCHECK_EQ(head.next, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
New CI, to be sure: https://ci.nodejs.org/job/node-test-commit/17121/ |
Landed in 34a948f |
Make this code (a bit more) comprehensible by adding some internals docs. With diagrams and everything! 🎉 PR-URL: #19469 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gus Caplan <me@gus.host>
Make this code (a bit more) comprehensible by adding some internals docs. With diagrams and everything! 🎉 PR-URL: #19469 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gus Caplan <me@gus.host>
Make this code (a bit more) comprehensible by adding some
internals docs.
It has diagrams and everything.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesCI: https://ci.nodejs.org/job/node-test-commit/17016/