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

cluster: improve for-loop #26336

Closed
wants to merge 1 commit into from

Conversation

@gengjiawen
Copy link
Member

commented Feb 27, 2019

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
@lpinca
lpinca approved these changes Feb 27, 2019
@targos
targos approved these changes Feb 27, 2019
@targos

This comment has been minimized.

Copy link
Member

commented Feb 27, 2019

Since we're not using the keys, it might be even better to do for (const worker of Object.values(cluster.workers)?

@gengjiawen gengjiawen force-pushed the gengjiawen:cluster_for_loop branch from 3f4394a to ea2892b Feb 28, 2019

@gengjiawen

This comment has been minimized.

Copy link
Member Author

commented Feb 28, 2019

@targos done.

@targos
targos approved these changes Feb 28, 2019
@BridgeAR

This comment has been minimized.

@ChALkeR
ChALkeR approved these changes Mar 1, 2019
Copy link
Member

left a comment

Perhaps also update these lines:

for (var key in workers) {
key = workers[key];

@gengjiawen gengjiawen force-pushed the gengjiawen:cluster_for_loop branch from ea2892b to 9bb7dac Mar 1, 2019

@gengjiawen

This comment has been minimized.

Copy link
Member Author

commented Mar 1, 2019

@ChALkeR done.

@gengjiawen gengjiawen force-pushed the gengjiawen:cluster_for_loop branch from 9bb7dac to 5d8c296 Mar 1, 2019

@gengjiawen gengjiawen force-pushed the gengjiawen:cluster_for_loop branch from 5d8c296 to 879e60a Mar 1, 2019

@addaleax

This comment has been minimized.

@jasnell
jasnell approved these changes Mar 2, 2019
@BridgeAR

This comment has been minimized.

Copy link
Member

commented Mar 4, 2019

@BridgeAR BridgeAR changed the title lib: improve for-loop in master.js cluster: improve for-loop Mar 5, 2019

BridgeAR added a commit to BridgeAR/node that referenced this pull request Mar 5, 2019
cluster: improve for-loop
PR-URL: nodejs#26336
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BridgeAR

This comment has been minimized.

Copy link
Member

commented Mar 5, 2019

Landed in e630569 🎉

@BridgeAR BridgeAR closed this Mar 5, 2019

@gengjiawen gengjiawen deleted the gengjiawen:cluster_for_loop branch Mar 5, 2019

BridgeAR added a commit to BridgeAR/node that referenced this pull request Mar 12, 2019
cluster: improve for-loop
PR-URL: nodejs#26336
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
BethGriggs added a commit that referenced this pull request Apr 16, 2019
cluster: improve for-loop
PR-URL: #26336
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BethGriggs BethGriggs referenced this pull request May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.