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'm reading source code to figure out how this lib works and I think #isIntervalPaused maybe useless and brings lots of related useless code.
if(!this.#isPaused){constcanInitializeInterval=!this.#isIntervalPaused;// THIS IS USELESS , REMOVE ITif(this.#doesIntervalAllowAnother &&this.#doesConcurrentAllowAnother){constjob=this.#queue.dequeue();if(!job){returnfalse;}this.emit('active');job();if(canInitializeInterval){// CHANGE 'canInitializeInterval' TO ‘this.#intervalId === undefined’ and remove any code no longer usedthis.#initializeIntervalIfNeeded();}returntrue;}}
As shown above, when code changes, all tests passed.
I found that these codes were introduced in this pr to enable p-queue the ability to throttle the queue, but #isIntervalPaused seems to be useless in this case, for that when I remove it from code as shown above, all test still passed, anyone can help me figure it out? Thanks.
The text was updated successfully, but these errors were encountered:
I'm reading source code to figure out how this lib works and I think #isIntervalPaused maybe useless and brings lots of related useless code.
As shown above, when code changes, all tests passed.
I found that these codes were introduced in this pr to enable p-queue the ability to throttle the queue, but #isIntervalPaused seems to be useless in this case, for that when I remove it from code as shown above, all test still passed, anyone can help me figure it out? Thanks.
The text was updated successfully, but these errors were encountered: