mirror of
https://github.com/vlang/v.git
synced 2025-09-16 07:52:32 +03:00
all: change optional to result of io (#16075)
This commit is contained in:
parent
6e46933c55
commit
f6844e9766
187 changed files with 1885 additions and 1874 deletions
|
@ -6,14 +6,14 @@ import sim.args as simargs
|
|||
import sim.img
|
||||
|
||||
fn main() {
|
||||
args := simargs.parse_args(extra_workers: 1)? as simargs.ParallelArgs
|
||||
args := simargs.parse_args(extra_workers: 1)! as simargs.ParallelArgs
|
||||
|
||||
img_settings := img.image_settings_from_grid(args.grid)
|
||||
|
||||
request_chan := chan &sim.SimRequest{cap: args.workers}
|
||||
result_chan := chan &sim.SimResult{cap: args.workers}
|
||||
|
||||
mut writer := img.ppm_writer_for_fname(args.filename, img_settings)?
|
||||
mut writer := img.ppm_writer_for_fname(args.filename, img_settings)!
|
||||
|
||||
mut workers := []thread{cap: args.workers + 1}
|
||||
mut bmark := benchmark.start()
|
||||
|
@ -39,7 +39,7 @@ fn main() {
|
|||
|
||||
workers << go img.image_worker(mut writer, result_chan, img_settings)
|
||||
|
||||
handle_request := fn [request_chan] (request &sim.SimRequest) ? {
|
||||
handle_request := fn [request_chan] (request &sim.SimRequest) ! {
|
||||
request_chan <- request
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue