c5967a9616
* Rename to saveBatch * forgot a file * first pass of cacheReader * OL2 tests have infinite timeout * OL2 refactor works * fix for tests * moved/removed types to make a more logical structure * fixed imports * rework loop to be in async generator for the expected count * get rid of pumps and fix test * lint fix * redo mermaid diagrams * add readme section on deferment * always return root first * fix linting * revert the counting * merge fixes * remove unused var
25 lines
513 B
TypeScript
25 lines
513 B
TypeScript
import Queue from './queue.js'
|
|
|
|
export default class AggregateQueue<T> implements Queue<T> {
|
|
#queue1: Queue<T>
|
|
#queue2: Queue<T>
|
|
|
|
constructor(queue1: Queue<T>, queue2: Queue<T>) {
|
|
this.#queue1 = queue1
|
|
this.#queue2 = queue2
|
|
}
|
|
async disposeAsync(): Promise<void> {
|
|
await this.#queue1.disposeAsync()
|
|
await this.#queue2.disposeAsync()
|
|
}
|
|
|
|
add(value: T): void {
|
|
this.#queue1.add(value)
|
|
this.#queue2.add(value)
|
|
}
|
|
|
|
values(): never {
|
|
throw new Error('Not implemented')
|
|
}
|
|
}
|