Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
concurrency
/
shared_array_last_test.v
11
lines
·
11
sloc
·
139 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
fn
test_shared_array_last() {
2
shared a := []int{}
3
lock {
4
a << 1
5
a << 2
6
}
7
rlock a {
8
println(a.last())
9
assert a.last() == 2
10
}
11
}
12