Changeset 79a0317 for imaps-frontend/node_modules/fastq/queue.js
- Timestamp:
- 01/21/25 03:08:24 (3 days ago)
- Branches:
- main
- Parents:
- 0c6b92a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/fastq/queue.js
r0c6b92a r79a0317 289 289 290 290 function drained () { 291 if (queue.idle()) { 292 return new Promise(function (resolve) { 293 resolve() 291 var p = new Promise(function (resolve) { 292 process.nextTick(function () { 293 if (queue.idle()) { 294 resolve() 295 } else { 296 var previousDrain = queue.drain 297 queue.drain = function () { 298 if (typeof previousDrain === 'function') previousDrain() 299 resolve() 300 queue.drain = previousDrain 301 } 302 } 294 303 }) 295 }296 297 var previousDrain = queue.drain298 299 var p = new Promise(function (resolve) {300 queue.drain = function () {301 previousDrain()302 resolve()303 }304 304 }) 305 305
Note:
See TracChangeset
for help on using the changeset viewer.