Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Dec 25, 2024
1 parent 044e247 commit 061dea7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/Network/SequentialQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ function unpause() {
Log.info(`[SequentialQueue] Unpausing the queue and flushing ${numberOfPersistedRequests} requests`);
isQueuePaused = false;

// A READ request will wait until all the WRITE requests are done, using isReadyPromise promise.
// When the queue is paused and then unpaused, we call flush which by defaults recreate the isReadyPromise.
// A READ request will wait until all the WRITE requests are done, using the isReadyPromise promise.
// When the queue is paused and then unpaused, we call flush which by defaults recreates the isReadyPromise.
// After all the WRITE requests are done, the isReadyPromise is resolved, but since it's a new instance of promise,
// the pending READ request never received the resolved callback. That's why we don't want to recreate
// the promise when unpausing the queue.
Expand Down

0 comments on commit 061dea7

Please sign in to comment.