All BatchedQueues should drain when disposed (also adds query string for output: "debug=true") (#5098)

* ensure disposal is correct

* add tests for disposal of batching queue

* fixes for draining disposal

* Update packages/objectloader2/src/queues/batchingQueue.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix comment

* fix tests and build

* add query string inspection of debug parameter

* Update packages/objectloader2/src/queues/batchingQueue.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/objectloader2/src/core/objectLoader2Factory.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix test

* fix AI

* export getQueryParameter to avoid dup code.  Sandbox uses it too

* add tests for functions

* prettier fix

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Adam Hathcock
2025-07-21 12:01:27 +01:00
committed by GitHub
parent 8b73e63bc2
commit 477db6ef02
14 changed files with 412 additions and 113 deletions
@@ -65,11 +65,10 @@ export class ObjectLoader2 {
await Promise.all([
this.#gathered.disposeAsync(),
this.#downloader.disposeAsync(),
this.#cacheWriter.disposeAsync()
this.#cacheWriter.disposeAsync(),
this.#cacheReader.disposeAsync()
])
this.#deferments.dispose()
this.#cacheReader.dispose()
this.#cache.dispose()
}
async getRootObject(): Promise<Item | undefined> {