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

@@ -58,7 +58,7 @@ fn (mut state AppState) update() {
threads.wait()
}
for t in 0 .. state.ntasks {
threads << go state.worker(t, chunk_channel, chunk_ready_channel)
threads << spawn state.worker(t, chunk_channel, chunk_ready_channel)
}
//
mut oview := ViewRect{}
@@ -237,6 +237,6 @@ fn main() {
scroll_fn: graphics_scroll
user_data: state
)
go state.update()
spawn state.update()
state.gg.run()
}

View File

@@ -58,6 +58,6 @@ fn main() {
frame_fn: graphics_frame
user_data: state
)
go state.update()
spawn state.update()
state.gg.run()
}

View File

@@ -42,7 +42,7 @@ fn main() {
fn init(mut app App) {
// Spawn a new worker thread.
go worker(mut app)
spawn worker(mut app)
}
// worker simulates a workload. This should be run in a separate thread.