2
0
mirror of https://github.com/boostorg/asio.git synced 2026-01-28 18:52:09 +00:00
Files
asio/include
Christopher Kohlhoff 2c50cd1e42 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:

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();
}
2021-02-25 08:33:25 +11:00
..