Example #1
0
File: main.cpp Project: CCJY/coliru
    ~Server()
    {
        acceptor.cancel();
        data_worker.interrupt();
        data_worker.join();

        work = boost::none;
        io_worker.join();
    }
	~peer_server()
	{
		m_acceptor.cancel();
		m_acceptor.close();
		if (m_thread) m_thread->join();
	}