Repository navigation
ngcc: new cluster worker entry-point - #36637
Closed
petebacondarwin wants to merge 12 commits into
Closed
petebacondarwin wants to merge 12 commits into
petebacondarwin wants to merge 12 commits into
Conversation
petebacondarwin
force-pushed
the
ngcc-worker-entry-point
branch
4 times, most recently
from
April 15, 2020 20:09
52c8f72 to
441dae7
Compare
…angular#36569)" This reverts commit 66effde.
petebacondarwin
force-pushed
the
ngcc-worker-entry-point
branch
3 times, most recently
from
April 16, 2020 10:00
78c8abb to
e22f60b
Compare
petebacondarwin
marked this pull request as ready for review
April 16, 2020 11:59
gkalpak
approved these changes
Apr 16, 2020
The change in e041ac6 to support sending unlocker process output to the main ngcc console output prevents messages require that the main process relinquishes the event-loop to allow the `stdout.on()` handler to run. This results in none of the messages being written when ngcc is run in `--no-async` mode, and some messages failing to be written if the main process is killed (e.g. ctrl-C). It appears that the problem with Windows and detached processes is known - see nodejs/node#3596 (comment). But in the meantime, this commit is a workaround, where non-Windows `inherit` the main process `stdout` while on Windows it reverts to the async handler approach, which is better than nothing.
petebacondarwin
force-pushed
the
ngcc-worker-entry-point
branch
4 times, most recently
from
April 16, 2020 16:19
c3b5dfb to
9932209
Compare
The `main.ts` and `worker.ts` had duplicate logic, which has now been moved to a single function called `getSharedSetup()`.
petebacondarwin
force-pushed
the
ngcc-worker-entry-point
branch
from
April 16, 2020 16:28
9932209 to
ee34b76
Compare
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
The change in e041ac6 to support sending unlocker process output to the main ngcc console output prevents messages require that the main process relinquishes the event-loop to allow the `stdout.on()` handler to run. This results in none of the messages being written when ngcc is run in `--no-async` mode, and some messages failing to be written if the main process is killed (e.g. ctrl-C). It appears that the problem with Windows and detached processes is known - see nodejs/node#3596 (comment). But in the meantime, this commit is a workaround, where non-Windows `inherit` the main process `stdout` while on Windows it reverts to the async handler approach, which is better than nothing. PR Close #36637
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
The `main.ts` and `worker.ts` had duplicate logic, which has now been moved to a single function called `getSharedSetup()`. PR Close #36637
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
The change in e041ac6 to support sending unlocker process output to the main ngcc console output prevents messages require that the main process relinquishes the event-loop to allow the `stdout.on()` handler to run. This results in none of the messages being written when ngcc is run in `--no-async` mode, and some messages failing to be written if the main process is killed (e.g. ctrl-C). It appears that the problem with Windows and detached processes is known - see nodejs/node#3596 (comment). But in the meantime, this commit is a workaround, where non-Windows `inherit` the main process `stdout` while on Windows it reverts to the async handler approach, which is better than nothing. PR Close #36637
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
The `main.ts` and `worker.ts` had duplicate logic, which has now been moved to a single function called `getSharedSetup()`. PR Close #36637
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This refactoring simplifies the clustering by providing a new entry-point file for cluster workers.
This reduces the complexity of the code (not having to check for
cluster.isMasterso much) and also removes the need to do parse and execute as much code in the worker processes.