v2 / vlib / v / tests / fns / go_array_wait_without_go_test.v
27 lines · 21 sloc · 276 bytes · 6488041a749df9762348d019c4223908c476f2e2
Raw
1fn test_go_array_wait_without_go() {
2 sa := SA{}
3 sb := SA{}
4
5 sa.wait()
6 sb.wait()
7
8 assert true
9}
10
11struct SA {
12mut:
13 threads []thread
14}
15
16pub fn (self SA) wait() {
17 self.threads.wait()
18}
19
20struct SB {
21mut:
22 threads []thread
23}
24
25pub fn (self SB) wait() {
26 self.threads.wait()
27}
28