1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

builtin: add methods to builtin channels (#6303)

This commit is contained in:
Uwe Krüger
2020-09-05 01:36:20 +02:00
committed by GitHub
parent 246fe3bfb7
commit b015033c53
5 changed files with 93 additions and 15 deletions

View File

@ -1,5 +1,3 @@
import sync
const (
num_iterations = 10000
)
@ -34,6 +32,6 @@ fn test_channel_array_mut() {
chs[0] <- t
t = <-chs[1]
}
(&sync.Channel(chs[0])).close()
chs[0].close()
assert t.n == 100 + num_iterations
}