mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-12 13:59:46 -04:00
refactor(worker_group): use range-based for
This commit is contained in:
parent
b945c2a23f
commit
f630402e19
@ -200,9 +200,9 @@ class basic_worker_group final : public worker_group::impl, private Policy {
|
|||||||
|
|
||||||
std::lock_guard lock(mx_);
|
std::lock_guard lock(mx_);
|
||||||
|
|
||||||
for (size_t i = 0; i < workers_.size(); ++i) {
|
for (auto const& worker : workers_) {
|
||||||
std::error_code ec;
|
std::error_code ec;
|
||||||
os_.thread_set_affinity(workers_[i].get_id(), cpus, ec);
|
os_.thread_set_affinity(worker.get_id(), cpus, ec);
|
||||||
if (ec) {
|
if (ec) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user