()
| 18 | } |
| 19 | |
| 20 | dequeueBackgroundJob() { |
| 21 | if (this.debounceTimer) { |
| 22 | return |
| 23 | } |
| 24 | |
| 25 | this.debounceTimer = setTimeout(() => { |
| 26 | const job = this.backgroundPool.shift() |
| 27 | |
| 28 | if (typeof job === 'function') { |
| 29 | job.call(this) |
| 30 | } |
| 31 | |
| 32 | this.clearDebounceTimer() |
| 33 | }, this.debounceTime) |
| 34 | } |
| 35 | |
| 36 | finishForegroundJob(key) { |
| 37 | return this.foregroundPool.delete(key) |
no test coverage detected