Skip to content

Commit

Permalink
Fix schedule hint not being taken from executor - default used by mis…
Browse files Browse the repository at this point in the history
…take
  • Loading branch information
biddisco committed Jan 14, 2020
1 parent 49eb429 commit 747e31b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hpx/lcos/local/futures_factory.hpp
Expand Up @@ -265,7 +265,7 @@ namespace hpx { namespace lcos { namespace local {
parallel::execution::post(*exec_,
util::deferred_call(
&base_type::run_impl, std::move(this_)),
schedulehint, annotation);
exec_->get_schedulehint(), annotation);
return threads::invalid_thread_id;
}
else if (policy == launch::fork)
Expand Down
10 changes: 8 additions & 2 deletions hpx/runtime/threads/thread_executor.hpp
Expand Up @@ -278,8 +278,9 @@ namespace hpx { namespace threads
stacksize, ec);
}

thread_priority get_priority() const { return priority_; }
thread_stacksize get_stacksize() const { return stacksize_; }
thread_stacksize get_stacksize() const { return stacksize_; }
thread_priority get_priority() const { return priority_; }
thread_schedule_hint get_schedulehint() const { return schedulehint_; }

protected:
thread_stacksize stacksize_;
Expand Down Expand Up @@ -478,6 +479,11 @@ namespace hpx { namespace threads
(executor_data_.get())->get_stacksize();
}

thread_schedule_hint get_schedulehint() const {
return static_cast<detail::scheduled_executor_base*>
(executor_data_.get())->get_schedulehint();
}

/// Return a reference to the default executor for this process.
static scheduled_executor& default_executor();
};
Expand Down

0 comments on commit 747e31b

Please sign in to comment.