Commit 9018413e authored by neverlord's avatar neverlord

fixed join order

parent 1a0ec155
......@@ -76,10 +76,12 @@ struct network_manager_impl : network_manager
void stop() // override
{
m_post_office->enqueue(nullptr, make_any_tuple(atom("DONE")));
m_mailman->enqueue(nullptr, make_any_tuple(atom("DONE")));
m_post_office_thread.join();
m_mailman_thread.join();
// wait until mailman is done; post_office closes all sockets
CPPA_MEMORY_BARRIER();
send_to_post_office(po_message{atom("DONE"), -1, 0});
m_post_office_thread.join();
close(pipe_fd[0]);
close(pipe_fd[0]);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment