Skip to main content

Posts

Showing posts with the label priority

Is there a way to set a Web Worker to low priority?

I am thinking of using Web Workers to provide some background functionality while a user is browsing my website (that's what Web Workers are for, right?). However, I don't want to take the risk of compromising the user experience by causing laggy scrolling, unresponsive controls, etc. Web Workers are mapped on OS threads, hence I would expect some control on the priority of these threads however, as far as I know, there's no such thing in the current API. Do you know a how to accomplish this? Even with a hack?