类:Channel


🌐 Class: Channel

Channel 表示数据管道中的一个名为通道的个体。它用于跟踪订阅者,并在有订阅者存在时发布消息。它作为一个独立的对象存在,以避免在发布时进行通道查找,从而实现非常快速的发布速度,并在高频使用时产生极低的成本。通道通过 diagnostics_channel.channel(name) 创建,不支持直接使用 new Channel(name) 构造通道。

🌐 The class Channel represents an individual named channel within the data pipeline. It is used to track subscribers and to publish messages when there are subscribers present. It exists as a separate object to avoid channel lookups at publish time, enabling very fast publish speeds and allowing for heavy use while incurring very minimal cost. Channels are created with diagnostics_channel.channel(name), constructing a channel directly with new Channel(name) is not supported.