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

Method unsubscribe

lib/diagnostics_channel.js:484–515  ·  view source on GitHub ↗
(handlers)

Source from the content-addressed store, hash-verified

482 }
483
484 unsubscribe(handlers) {
485 let done = true;
486
487 // Unsubscribe from call window
488 if (handlers.start || handlers.end) {
489 if (!this.#callWindow.unsubscribe({
490 start: handlers.start,
491 end: handlers.end,
492 })) {
493 done = false;
494 }
495 }
496
497 // Unsubscribe from continuation window
498 if (handlers.asyncStart || handlers.asyncEnd) {
499 if (!this.#continuationWindow.unsubscribe({
500 start: handlers.asyncStart,
501 end: handlers.asyncEnd,
502 })) {
503 done = false;
504 }
505 }
506
507 // Unsubscribe from error channel
508 if (handlers.error) {
509 if (!this.error.unsubscribe(handlers.error)) {
510 done = false;
511 }
512 }
513
514 return done;
515 }
516
517 traceSync(fn, context = { __proto__: null }, thisArg, ...args) {
518 if (!this.hasSubscribers) {

Callers

nothing calls this directly

Calls 1

unsubscribeMethod · 0.45

Tested by

no test coverage detected