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

Method constructor

lib/internal/worker/io.js:251–263  ·  view source on GitHub ↗
(port, name)

Source from the content-addressed store, hash-verified

249
250class ReadableWorkerStdio extends Readable {
251 constructor(port, name) {
252 super();
253 this[kPort] = port;
254 this[kName] = name;
255 this[kIncrementsPortRef] = true;
256 this[kStartedReading] = false;
257 this.on('end', () => {
258 if (this[kStartedReading] && this[kIncrementsPortRef]) {
259 if (--this[kPort][kWaitingStreams] === 0)
260 this[kPort].unref();
261 }
262 });
263 }
264
265 _read() {
266 if (!this[kStartedReading] && this[kIncrementsPortRef]) {

Callers

nothing calls this directly

Calls 2

onMethod · 0.45
unrefMethod · 0.45

Tested by

no test coverage detected