v2 / vlib / v / tests / concurrency / shared_array_ptr_test.v
12 lines · 11 sloc · 118 bytes · 6488041a749df9762348d019c4223908c476f2e2
Raw
1struct AA {
2mut:
3 a shared []&int
4}
5
6fn test_shared_array_ptr() {
7 mut a := AA{}
8 b := 3
9 lock a.a {
10 a.a << &b
11 }
12}
13