DEP0163:channel.subscribe(onMessage),channel.unsubscribe(onMessage)


【DEP0163: channel.subscribe(onMessage), channel.unsubscribe(onMessage)

类型:仅文档

【Type: Documentation-only】

这些方法已被弃用,因为它们可能被用于一种不能保持通道引用足够长时间以接收事件的方式。

【These methods were deprecated because they can be used in a way which does not hold the channel reference alive long enough to receive the events.】

改用 diagnostics_channel.subscribe(name, onMessage)diagnostics_channel.unsubscribe(name, onMessage),它们做的事情一样。

【Use diagnostics_channel.subscribe(name, onMessage) or diagnostics_channel.unsubscribe(name, onMessage) which does the same thing instead.】