1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

fmt: replace go with spawn

This commit is contained in:
Alexander Medvednikov
2022-11-05 10:46:40 +03:00
parent a082328e40
commit e81e0ac708
126 changed files with 262 additions and 262 deletions

View File

@ -15,7 +15,7 @@ fn test_count_10_times_1_cycle_should_result_10_cycles_with_sync() {
mut counter := &Counter{}
wg.add(10)
for i := 0; i < 10; i++ {
go count_one_cycle(mut counter, mut wg)
spawn count_one_cycle(mut counter, mut wg)
}
wg.wait()
assert counter.counter == u64(desired_iterations)
@ -29,7 +29,7 @@ fn test_count_10_times_1_cycle_should_not_be_10_cycles_without_sync() {
mut counter := &Counter{}
wg.add(10)
for i := 0; i < 10; i++ {
go count_one_cycle_without_sync(mut counter, mut wg)
spawn count_one_cycle_without_sync(mut counter, mut wg)
}
wg.wait()
// Note: we do not assert here, just print, because sometimes by chance counter.counter may be == desired_iterations