Files
speckle-server/packages/objectloader2/src/queues/aggregateQueue.ts
T
Adam Hathcock c5967a9616 (OL2) move files around to make more sense (#4950)
* 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
2025-06-26 13:28:50 +01:00

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')
}
}