Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix outstanding_work.tracked executor move assignment.
Move assignments for io_context and thread pool executors are missing the logic present in copy assignments that finishes work on old contexts. This causes the following example to hang: #include <boost/asio/execution/outstanding_work.hpp> #include <boost/asio/prefer.hpp> #include <boost/asio/static_thread_pool.hpp> int main() { asio::static_thread_pool tp1{1},tp2{1}; { auto work = asio::prefer(tp1.get_executor(), asio::execution::outstanding_work.tracked); work = asio::prefer(tp2.get_executor(), asio::execution::outstanding_work.tracked); } tp1.join(); tp2.join(); }
- Loading branch information