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

fix(WebWorker): Don't send messages when the buffer is empty #4138

Closed
wants to merge 1 commit into from

Conversation

jteplitz
Copy link
Contributor

No description provided.

@jteplitz jteplitz added action: review The PR is still awaiting reviews from at least one requested reviewer comp: core/webworker labels Sep 11, 2015
@@ -46,8 +46,10 @@ abstract class GenericMessageBusSink implements MessageBusSink {
void attachToZone(NgZone zone) {
_zone = zone;
_zone.overrideOnEventDone(() {
sendMessages(_messageBuffer);
_messageBuffer.clear();
if (_messageBuffer.length > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this check be in the sendMessages method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No because sendMessages is called whenever the there are messages to send. It's overridden by the specific message bus implementations, so it doesn't make sense to call it with an empty array.

@yjbanov yjbanov added pr_state: LGTM and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Sep 11, 2015
@tbosch
Copy link
Contributor

tbosch commented Sep 28, 2015

@yjbanov ping?

@yjbanov
Copy link
Contributor

yjbanov commented Sep 28, 2015

Will pick up web worker stuff once we're done with pre-compilation.

@jteplitz jteplitz closed this in 8485ef9 Oct 29, 2015
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants