YuzuJS/setImmediate

setImmediate blocks setInterval in webworker (Chrome)

sisou opened this issue · 1 comments

sisou commented

Hello!

I found a problem with setImmediate in a webworker in Chrome, that does not happen in a regular browser script.

The minimal problem demonstration consists of 3 files: index.html, webworker.js and setImmediate.js:
https://gist.github.com/sisou/36349497b4d65e7db0ce98812c53d88f

Problem

In the index.html, I start a setInterval to output stuff every second. Then, I run a function work() 20000x that calls itself when it is done with setImmediate(work).

In the index.html inline script, this works fine and I get the work and the output every second.

In parallel I also start a webworker with the exact same code, but there the setInterval is not processed every second.

Only Chrome

It works as expected in Firefox. I can only test Chrome additionally (no access to Windows right now).

Since this is a Chrome bug, I'd suggest reporting it at crbug.com, not here.