channel.unbindStore(store)
稳定性: 1 - 实验性
store<AsyncLocalStorage> 要从通道解绑的商店。- 返回:<boolean> 如果找到商店,则为
true,否则为false。
移除之前使用 channel.bindStore(store) 在此通道注册的消息处理程序。
【Remove a message handler previously registered to this channel with
channel.bindStore(store).】
import diagnostics_channel from 'node:diagnostics_channel';
import { AsyncLocalStorage } from 'node:async_hooks';
const store = new AsyncLocalStorage();
const channel = diagnostics_channel.channel('my-channel');
channel.bindStore(store);
channel.unbindStore(store);const diagnostics_channel = require('node:diagnostics_channel');
const { AsyncLocalStorage } = require('node:async_hooks');
const store = new AsyncLocalStorage();
const channel = diagnostics_channel.channel('my-channel');
channel.bindStore(store);
channel.unbindStore(store);