We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the following use-case work:
TEST_CASE("ThreadPool: Cancellation", "[ThreadPool][Cancellation]") { std::atomic<int> counter{ 0 }; opencmw::BasicThreadPool<opencmw::IO_BOUND> pool("contention", 1, 4); pool.waitUntilInitialised(); pool.execute( [&counter](std::stop_token stop_token) { while (!stop_token.stop_requested()) { std::this_thread::sleep_for(std::chrono::milliseconds(10)); } }); }
This will allow interrupting running threads when the application wants to shut down.
The text was updated successfully, but these errors were encountered:
done and implemented by @wirew0rm in
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Make the following use-case work:
This will allow interrupting running threads when the application wants to shut down.
The text was updated successfully, but these errors were encountered: