runtime: Select/TrySelect

This commit is contained in:
xushiwei
2024-07-06 21:59:28 +08:00
parent b0941faf88
commit 453faa6a76
8 changed files with 297 additions and 28 deletions

View File

@@ -36,6 +36,7 @@ func main() {
runtime.ChanClose(c)
v = 10
if runtime.ChanTrySend(c, unsafe.Pointer(&v), eltSize) {
println("error: chan send to closed chan")
}