Skip to content

Commit

Permalink
Fix scheduler build with some boost versions.
Browse files Browse the repository at this point in the history
Some boost versions have a conflicting overload of wait_until that returns void.
Explicitly use a template here to avoid hitting that overload.
  • Loading branch information
theuni committed Jun 15, 2015
1 parent c1fb0e1 commit 72bf90d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ void CScheduler::serviceQueue()
// Keep waiting until timeout
}
#else
// Some boost versions have a conflicting overload of wait_until that returns void.
// Explicitly use a template here to avoid hitting that overload.
while (!shouldStop() && !taskQueue.empty() &&
newTaskScheduled.wait_until(lock, taskQueue.begin()->first) != boost::cv_status::timeout) {
newTaskScheduled.wait_until<>(lock, taskQueue.begin()->first) != boost::cv_status::timeout) {
// Keep waiting until timeout
}
#endif
Expand Down

0 comments on commit 72bf90d

Please sign in to comment.