diff options
author | Stefan Fisk <contact@stefanfisk.com> | 2015-07-21 21:10:23 +0200 |
---|---|---|
committer | Stefan Fisk <contact@stefanfisk.com> | 2015-07-21 21:10:23 +0200 |
commit | 9a2f434b282578d29d1205958c2c7d3b57b865ad (patch) | |
tree | 87e9c91c5201da27b41c93d4b7cc1e61e6c0d7cf /Rx | |
parent | d69cdd73e3e3f82d23714f782df72204cb6a611c (diff) | |
download | RxCpp-9a2f434b282578d29d1205958c2c7d3b57b865ad.tar.gz |
Fix event_loop creating N-1 threads
The constructors were creating one thread to few.
Diffstat (limited to 'Rx')
-rw-r--r-- | Rx/v2/src/rxcpp/schedulers/rx-eventloop.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Rx/v2/src/rxcpp/schedulers/rx-eventloop.hpp b/Rx/v2/src/rxcpp/schedulers/rx-eventloop.hpp index 18bfee5..4db38ec 100644 --- a/Rx/v2/src/rxcpp/schedulers/rx-eventloop.hpp +++ b/Rx/v2/src/rxcpp/schedulers/rx-eventloop.hpp @@ -68,7 +68,7 @@ public: , count(0) { auto remaining = std::max(std::thread::hardware_concurrency(), unsigned(4)); - while (--remaining) { + while (remaining--) { loops.push_back(newthread.create_worker()); } } @@ -78,7 +78,7 @@ public: , count(0) { auto remaining = std::max(std::thread::hardware_concurrency(), unsigned(4)); - while (--remaining) { + while (remaining--) { loops.push_back(newthread.create_worker()); } } |