MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / ReadableByteStreamControllerCallPullIfNeeded

Function ReadableByteStreamControllerCallPullIfNeeded

out/cli.cjs:11374–11396  ·  view source on GitHub ↗
(controller)

Source from the content-addressed store, hash-verified

11372 return x5 instanceof ReadableStreamBYOBRequest2;
11373 }
11374 function ReadableByteStreamControllerCallPullIfNeeded(controller) {
11375 const shouldPull = ReadableByteStreamControllerShouldCallPull(controller);
11376 if (!shouldPull) {
11377 return;
11378 }
11379 if (controller._pulling) {
11380 controller._pullAgain = true;
11381 return;
11382 }
11383 controller._pulling = true;
11384 const pullPromise = controller._pullAlgorithm();
11385 uponPromise(pullPromise, () => {
11386 controller._pulling = false;
11387 if (controller._pullAgain) {
11388 controller._pullAgain = false;
11389 ReadableByteStreamControllerCallPullIfNeeded(controller);
11390 }
11391 return null;
11392 }, (e3) => {
11393 ReadableByteStreamControllerError(controller, e3);
11394 return null;
11395 });
11396 }
11397 function ReadableByteStreamControllerClearPendingPullIntos(controller) {
11398 ReadableByteStreamControllerInvalidateBYOBRequest(controller);
11399 controller._pendingPullIntos = new SimpleQueue();

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…