有界通道 通道
🌐 BoundedChannel Channels
一个 BoundedChannel 由两个诊断通道组成,表示使用 using 语法创建的作用域的生命周期:
🌐 A BoundedChannel consists of two diagnostics channels representing the
lifecycle of a scope created with the using syntax:
tracing:${name}:start- 在执行using语句(创建作用域)时发布tracing:${name}:end- 在退出块时发布(作用域释放)
当使用 ['boundedChannel.withScope([context])'][] 的 using 语法时,start
事件在语句执行时立即发布,而 end事件
当处理发生在区块末尾时,会自动发布。全部
事件共享相同的上下文对象,且可以通过添加上下文对象进行扩展
在作用域执行时,比如result这样的属性。
🌐 When using the using syntax with [boundedChannel.withScope([context])][], the start
event is published immediately when the statement executes, and the end event
is automatically published when disposal occurs at the end of the block. All
events share the same context object, which can be extended with additional
properties like result during scope execution.