MCPcopy Create free account
hub / github.com/denoland/std / pull

Method pull

cbor/_array_decoded_stream.ts:48–54  ·  view source on GitHub ↗
(controller)

Source from the content-addressed store, hash-verified

46 constructor(gen: AsyncGenerator<CborStreamOutput>, releaseLock: ReleaseLock) {
47 super({
48 async pull(controller) {
49 const { done, value } = await gen.next();
50 if (done) {
51 releaseLock();
52 controller.close();
53 } else controller.enqueue(value);
54 },
55 async cancel() {
56 // deno-lint-ignore no-empty
57 for await (const _ of gen) {}

Callers

nothing calls this directly

Calls 2

closeMethod · 0.65
nextMethod · 0.45

Tested by

no test coverage detected