Skip to content

Commit

Permalink
Minimized use of policy_manager_lock_.
Browse files Browse the repository at this point in the history
  • Loading branch information
SNiukalov committed Nov 9, 2018
1 parent 8dd6d43 commit 741b392
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 126 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -744,9 +744,12 @@ class PolicyHandler : public PolicyHandlerInterface,
* @return result PolicyManager function
*/
template <typename Func, typename... Args>
auto CallPolicyManagerFunction(Func func, Args... args) const
auto CallPolicyManagerFunction(Func func, Args&&... args) const
-> decltype((std::declval<PolicyManager>().*
std::declval<Func>())(std::declval<Args>()...));
std::declval<Func>())(std::declval<Args>()...)) {
sync_primitives::AutoLock lock(policy_manager_lock_);
return ((*policy_manager_).*func)(args...);
}

/**
* @brief Contains device handles, which were sent for user consent to HMI
Expand Down
Loading

0 comments on commit 741b392

Please sign in to comment.