Skip to content

Commit

Permalink
Merge pull request #2686 from STEllAR-GROUP/fixing_2682
Browse files Browse the repository at this point in the history
Allowing throttling scheduler to be used without idle backoff
  • Loading branch information
sithhell committed Jun 16, 2017
2 parents 2c4e138 + 0def9d4 commit 5a4e9e5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion hpx/runtime/threads/policies/throttling_scheduler.hpp
Expand Up @@ -65,8 +65,13 @@ namespace hpx { namespace threads { namespace policies

using local_queue_scheduler<
Mutex, PendingQueuing, StagedQueuing, TerminatedQueuing>::queues_;

#if defined(HPX_HAVE_THREAD_MANAGER_IDLE_BACKOFF)
using local_queue_scheduler<
Mutex, PendingQueuing, StagedQueuing, TerminatedQueuing>::mtx_;
using local_queue_scheduler<
Mutex, PendingQueuing, StagedQueuing, TerminatedQueuing>::cond_;
#endif
using local_queue_scheduler<
Mutex, PendingQueuing, StagedQueuing, TerminatedQueuing>::curr_queue_;

Expand Down Expand Up @@ -270,7 +275,10 @@ namespace hpx { namespace threads { namespace policies
protected:
typedef hpx::lcos::local::spinlock mutex_type;
mutex_type throttle_mtx_;
mutable std::mutex mtx_;
#if !defined(HPX_HAVE_THREAD_MANAGER_IDLE_BACKOFF)
mutable compat::mutex mtx_;
compat::condition_variable cond_;
#endif
mutable boost::dynamic_bitset<> disabled_os_threads_;
int num_physical_cores;
int num_logical_cores;
Expand Down

0 comments on commit 5a4e9e5

Please sign in to comment.