MCPcopy Index your code
hub / github.com/nodejs/node / processInputAsync

Function processInputAsync

lib/internal/streams/iter/transform.js:420–437  ·  view source on GitHub ↗
(input, flushFlag)

Source from the content-addressed store, hash-verified

418
419 // Dispatch input to the threadpool and return a promise.
420 function processInputAsync(input, flushFlag) {
421 const { promise, resolve, reject } = PromiseWithResolvers();
422 resolveWrite = resolve;
423 rejectWrite = reject;
424 writeInput = input;
425 writeFlush = flushFlag;
426 writeInOff = 0;
427 writeAvailIn = TypedArrayPrototypeGetByteLength(input);
428 writeAvailOutBefore = chunkSize - outOffset;
429
430 // Keep input alive while the threadpool references it.
431 handle.buffer = input;
432
433 handle.write(flushFlag,
434 input, 0, writeAvailIn,
435 outBuf, outOffset, writeAvailOutBefore);
436 return promise;
437 }
438
439 function drainBatch() {
440 if (pendingBytes <= BATCH_HWM) {

Callers 1

makeZlibTransformFunction · 0.85

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…