4 ms·
Show HN: Priority based task execution in JavaScript using web worker
Code snippet: https://gist.github.com/pbadenski/a4ce272dfdcb517974c3d01682395443 https://gist.github.com/pbadenski/a4ce272dfdcb517974c3d01682...
I couldn't find any (decent) examples on the web, and I'm hoping others will find this contribution useful.
I'm also not entirely sure this is foolproof (although it seems to work ok). I'm hoping HN can help.