Skip to content
New issue

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

thread_pool with default constructor is broken #1584

Open
sneves opened this issue Jan 14, 2025 · 0 comments
Open

thread_pool with default constructor is broken #1584

sneves opened this issue Jan 14, 2025 · 0 comments

Comments

@sneves
Copy link

sneves commented Jan 14, 2025

thread_pool in the most recent Asio version, as seen on Boost 1.87.0, is broken. Example code:

boost::asio::thread_pool pool {};
boost::asio::post(pool, [] {
  fmt::println("hello");
});
pool.join();

This will, more often than not, simply not print anything. The root cause here is found in commit 480e88b where thread_pool::thread_pool() was not updated to also set joinable_(true).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant