添加通道连接特性,可用+连接两个通道,连接后将交换双方的接收端

This commit is contained in:
远野千束 2024-10-13 01:12:19 +08:00
parent ffd7847fb1
commit 8e94cd996f

View File

@ -92,7 +92,7 @@ class Chan(Generic[T]):
"""
return self.recv(None)
def __add__(self, other: "Chan[T]") -> "Chan[T]":
def __add__(self, other: "Chan[T]"):
"""
Connect 1 channel.send to another channel.recv.
Args: