| 1 | fn 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 | |
| 11 | struct SA { |
| 12 | mut: |
| 13 | threads []thread |
| 14 | } |
| 15 | |
| 16 | pub fn (self SA) wait() { |
| 17 | self.threads.wait() |
| 18 | } |
| 19 | |
| 20 | struct SB { |
| 21 | mut: |
| 22 | threads []thread |
| 23 | } |
| 24 | |
| 25 | pub fn (self SB) wait() { |
| 26 | self.threads.wait() |
| 27 | } |
| 28 |