示例#1
0
void Plugin_Quit()
{
	forwarder->Quit();
	streamManager->quit();

	streamer.release();
	forwarder.release();
	mpdClient.release();
	streamManager.release();

	io_service.stop();
	//::WaitForSingleObject(io_sync_mutex, INFINITE);
}
示例#2
0
void handleConnected(asio::io_service &ioService, RedisAsyncClient &redis,
        bool ok, const std::string &errmsg)
{
    if( ok )
    {
        redis.command("SET", redisKey, redisValue, [&](const RedisValue &v) {
            std::cerr << "SET: " << v.toString() << std::endl;

            redis.command("GET", redisKey, [&](const RedisValue &v) {
                std::cerr << "GET: " << v.toString() << std::endl;

                redis.command("DEL", redisKey, [&](const RedisValue &) {
                    ioService.stop();
                });
            });
        });
    }
    else
    {
        std::cerr << "Can't connect to redis: " << errmsg << std::endl;
    }
}
示例#3
0
void Connection::terminate()
{
    g_ioService.stop();
    m_outputStreams.clear();
}
示例#4
0
文件: asio_mt_impl.cpp 项目: stdk/u2
	virtual ~AsioMTImpl() {
		io_svc.stop();
		io_thread.join();
	}
示例#5
0
文件: WorkQ.hpp 项目: urykhy/rpc
 void term() {
     io_service.stop();
 }
示例#6
0
void Connection::terminate()
{
    g_ioService.stop();
}