p-ranav / psched

Priority-based Task Scheduling for Modern C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lambda capture not used

isaacault opened this issue · comments

When I compile with cmake I get include/psched/priority_scheduler.h:83:33: warning: lambda capture 'n' is not used [-Wunused-lambda-capture], but when I import to other projects this warning becomes an error.

Do we need n in the lambda capture?

Full error output:
In file included from psched/samples/multiple_periodic_tasks.cpp:2: psched/include/psched/priority_scheduler.h:83:33: warning: lambda capture 'n' is not used [-Wunused-lambda-capture] threads_.emplace_back([&, n] { run(); });

This issue seems to be only reproducible on x86 MacOS. Perhaps irrelevant.

Thanks for reporting. Will fix this shortly.