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

@@ -38,7 +38,7 @@ fn main() {
mut no := nobj
for i in 0 .. nrec {
n := no / (nrec - i)
go do_rec(ch, resch, n)
spawn do_rec(ch, resch, n)
no -= n
}
$if debug {
@@ -49,7 +49,7 @@ fn main() {
n := no / (nsend - i)
end := no
no -= n
go do_send(ch, no, end)
spawn do_send(ch, no, end)
}
assert no == 0
mut sum := i64(0)

View File

@@ -117,11 +117,11 @@ fn main() {
}
ctx.pops_wg.add(n_readers)
for i := 0; i < n_readers; i++ {
go do_rec(ch, i, mut ctx)
spawn do_rec(ch, i, mut ctx)
}
ctx.pushes_wg.add(n_writers)
for i := 0; i < n_writers; i++ {
go do_send(ch, i, mut ctx)
spawn do_send(ch, i, mut ctx)
}
ctx.pushes_wg.wait()
eprintln('>> all pushes done')