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:
@@ -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()
|
||||
}
|
||||
|
||||
@@ -58,6 +58,6 @@ fn main() {
|
||||
frame_fn: graphics_frame
|
||||
user_data: state
|
||||
)
|
||||
go state.update()
|
||||
spawn state.update()
|
||||
state.gg.run()
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user