mirror of
https://github.com/vlang/v.git
synced 2025-09-15 07:22:27 +03:00
builtin: add methods to builtin channels (#6303)
This commit is contained in:
parent
246fe3bfb7
commit
b015033c53
5 changed files with 93 additions and 15 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue