Closed robinbernon closed 3 years ago
Thanks @robinbernon, looks good! Two things: would you be able to make the same change to ProcessPool::new
, and given its ordering (fn new(processes: Option<usize>, tasks_per_core: Option<usize>, resources: Resources)
), perhaps num_cores
could come before tasks_per_core
for both methods, and also be renamed just cores
?
Thanks @robinbernon, looks good! Two things: would you be able to make the same change to
ProcessPool::new
, and given its ordering (fn new(processes: Option<usize>, tasks_per_core: Option<usize>, resources: Resources)
), perhapsnum_cores
could come beforetasks_per_core
for both methods, and also be renamed justcores
?
Have added cores input for ProcessPool and also changed the input param from num_cores => cores.
In keeping to a similar input style to the rust-threadpool crate: https://github.com/rust-threadpool/rust-threadpool/blob/master/src/lib.rs#L367 thought it would be best to have the new input param as num_cores.