Skip to content

Commit

Permalink
Allowing throttling scheduler to be used without idle backoff
Browse files Browse the repository at this point in the history
This patch adds the missing condition variable member in the case when
HPX_WITH_THREAD_MANAGER_IDLE_BACKOFF is turned OFF.
  • Loading branch information
Thomas Heller committed Jun 7, 2017
1 parent 396e999 commit 0ef51f0
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 0ef51f0

Please sign in to comment.