1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 21:35:45 +02:00

task: make it build with clang

Remove unused closure captures.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
Zygo Blaxell 2020-12-17 16:34:15 -05:00
parent 8e9b53b3fd
commit 29b051b131

View File

@ -99,7 +99,7 @@ test_barrier(size_t count)
oss << "task #" << c; oss << "task #" << c;
Task t( Task t(
oss.str(), oss.str(),
[c, &task_done, &mtx, &cv, bl]() mutable { [c, &task_done, &mtx, bl]() mutable {
// cerr << "Task #" << c << endl; // cerr << "Task #" << c << endl;
unique_lock<mutex> lock(mtx); unique_lock<mutex> lock(mtx);
task_done.at(c) = true; task_done.at(c) = true;
@ -166,8 +166,9 @@ test_exclusion(size_t count)
oss << "task #" << c; oss << "task #" << c;
Task t( Task t(
oss.str(), oss.str(),
[c, &only_one, &mtx, &excl, bl]() mutable { [c, &only_one, &excl, bl]() mutable {
// cerr << "Task #" << c << endl; // cerr << "Task #" << c << endl;
(void)c;
auto lock = excl.try_lock(); auto lock = excl.try_lock();
if (!lock) { if (!lock) {
excl.insert_task(Task::current_task()); excl.insert_task(Task::current_task());