类:Channel


\Class: Channel

新增于: v15.1.0, v14.17.0

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.

AltStyle によって変換されたページ (->オリジナル) /