You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I played around with this library a bit to see how easy it is to use a worker thread. Whilst I was using it, I stumbled upon weird behavior where the while loop only run once inside the worker thread. Here is the minimal example to reproduce:
import{start,job}from"microjob";(async()=>{try{// start worker poolawaitstart({maxWorkers: 4});// you can also limit the available workersjob(()=>{while(true){console.log("inside loop")}})// ...}catch(err){console.error(err);}})();
The text was updated successfully, but these errors were encountered:
I played around with this library a bit to see how easy it is to use a worker thread. Whilst I was using it, I stumbled upon weird behavior where the while loop only run once inside the worker thread. Here is the minimal example to reproduce:
The text was updated successfully, but these errors were encountered: