Files
speckle-server/packages/objectloader2/src/queues/bufferQueue.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

16 lines
283 B
TypeScript

import Queue from './queue.js'
export default class BufferQueue<T> implements Queue<T> {
#buffer: T[] = []
add(value: T): void {
this.#buffer.push(value)
}
values(): T[] {
return this.#buffer
}
disposeAsync(): Promise<void> {
return Promise.resolve()
}
}