New issue
Advanced search Search tips

Issue 739452 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 725302
Owner: ----
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

MessageChannel messages starving out other messages?

Reported by wobas...@programmingbasics.org, Jul 5 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

Steps to reproduce the problem:
1. Create a web worker 
2. Have the web worker use a message channel to continually send messages to itself
3. Try to also send messages to the worker from the parent process to the web worker

What is the expected behavior?
Web worker will receive events from the message channel and from the parent process in the order they were sent.

What went wrong?
Web worker only receives messages from the message channel. It will only receive the messages from the parent process when there are no messages left in the message channel

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 59.0.3071.115  Channel: stable
OS Version: 10.0
Flash Version: 

Somehow, the MessageChannel messages are receiving priority over other types of events. Maybe the event handler is checking the message channel queue first before the regular event queue. This can lead to the other event queues getting starved out if there are a lot of MessageChannel events (in my case, I was using the MessageChannel to keep the worker "awake" to do a long term background computation, but it couldn't receive updates from the parent any more).
 
index.html
166 bytes View Download
worker.js
374 bytes View Download
Components: Blink>Workers Blink>Messaging

Comment 2 by mek@chromium.org, Jul 5 2017

Mergedinto: 725302
Status: Duplicate (was: Unconfirmed)

Sign in to add a comment