Skip to content

Commit

Permalink
Change default value of num_threads (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinkle23897 authored Jul 15, 2022
1 parent b1b9434 commit ea86c2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion envpool/core/async_envpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class AsyncEnvPool : public EnvPool<typename Env::Spec> {
f.get();
}
if (num_threads_ == 0) {
num_threads_ = batch_;
num_threads_ = std::min(batch_, processor_count);
}
for (std::size_t i = 0; i < num_threads_; ++i) {
workers_.emplace_back([this] {
Expand Down

0 comments on commit ea86c2b

Please sign in to comment.