MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / #writeAllChunks

Method #writeAllChunks

src/utils/task/diskOutput.ts:178–186  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

176 }
177
178 #writeAllChunks(): Promise<void> {
179 // This code is extremely precise.
180 // You **must not** add an await here!! That will cause memory to balloon as the queue grows.
181 // It's okay to add an `await` to the caller of this method (e.g. #drainAllChunks) because that won't cause Buffer[] to be kept alive in memory.
182 return this.#fileHandle!.appendFile(
183 // This variable needs to get GC'd ASAP.
184 this.#queueToBuffers(),
185 )
186 }
187
188 /** Keep this in a separate method so that GC doesn't keep it alive for any longer than it should. */
189 #queueToBuffers(): Buffer {

Callers 1

#drainAllChunksMethod · 0.95

Calls 1

#queueToBuffersMethod · 0.95

Tested by

no test coverage detected