当前位置: 首页>>代码示例>>C++>>正文


C++ PoolPtr::reset方法代码示例

本文整理汇总了C++中PoolPtr::reset方法的典型用法代码示例。如果您正苦于以下问题:C++ PoolPtr::reset方法的具体用法?C++ PoolPtr::reset怎么用?C++ PoolPtr::reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PoolPtr的用法示例。


在下文中一共展示了PoolPtr::reset方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

	~Server() {
		TRACE_POINT();
		this_thread::disable_syscall_interruption dsi;
		this_thread::disable_interruption di;
		
		P_DEBUG("Shutting down helper agent...");
		prestarterThread->interrupt_and_join();
		if (messageServerThread != NULL) {
			messageServerThread->interrupt_and_join();
		}
		
		messageServer.reset();
		P_DEBUG("Destroying application pool...");
		pool->destroy();
		uninstallDiagnosticsDumper();
		pool.reset();
		poolLoop.stop();
		requestLoop.stop();
		requestHandler.reset();

		if (!options.requestSocketLink.empty()) {
			syscalls::unlink(options.requestSocketLink.c_str());
		}
		
		P_TRACE(2, "All threads have been shut down.");
	}
开发者ID:jbpg,项目名称:passenger,代码行数:26,代码来源:Main.cpp

示例2:

static void
sigint_cb(struct ev_loop *loop, ev_signal *w, int revents) {
	P_WARN("Exiting loop");
	delete handler;
	handler = NULL;
	pool->destroy();
	pool.reset();
	ev_signal_stop(loop, &sigquitwatcher);
	ev_signal_stop(loop, &sigintwatcher);
	ev_break(loop, EVBREAK_ONE);
}
开发者ID:AlfiyaZi,项目名称:passenger,代码行数:11,代码来源:RequestHandler.cpp

示例3: readlink

	~Server() {
		TRACE_POINT();
		this_thread::disable_syscall_interruption dsi;
		this_thread::disable_interruption di;
		
		P_DEBUG("Shutting down helper agent...");
		prestarterThread->interrupt_and_join();
		if (messageServerThread != NULL) {
			messageServerThread->interrupt_and_join();
		}
		
		messageServer.reset();
		P_DEBUG("Destroying application pool...");
		pool->destroy();
		uninstallDiagnosticsDumper();
		pool.reset();
		poolLoop.stop();
		requestLoop.stop();
		requestHandler.reset();

		if (!options.requestSocketLink.empty()) {
			char path[PATH_MAX + 1];
			ssize_t ret;
			bool shouldUnlink;

			ret = readlink(options.requestSocketLink.c_str(), path, PATH_MAX);
			if (ret != -1) {
				path[ret] = '\0';
				// Only unlink if a new Flying Passenger instance hasn't overwritten the
				// symlink.
				// https://code.google.com/p/phusion-passenger/issues/detail?id=939
				shouldUnlink = getRequestSocketFilename() == path;
			} else {
				shouldUnlink = true;
			}

			if (shouldUnlink) {
				syscalls::unlink(options.requestSocketLink.c_str());
			}
		}
		
		P_TRACE(2, "All threads have been shut down.");
	}
开发者ID:king52311,项目名称:passenger,代码行数:43,代码来源:Main.cpp

示例4:

	~Server() {
		TRACE_POINT();
		this_thread::disable_syscall_interruption dsi;
		this_thread::disable_interruption di;
		
		P_DEBUG("Shutting down helper agent...");
		prestarterThread->interrupt_and_join();
		if (messageServerThread != NULL) {
			messageServerThread->interrupt_and_join();
		}
		
		messageServer.reset();
		pool->destroy();
		pool.reset();
		requestHandler.reset();
		poolLoop.stop();
		requestLoop.stop();
		
		P_TRACE(2, "All threads have been shut down.");
	}
开发者ID:secobarbxtal,项目名称:passenger,代码行数:20,代码来源:Main.cpp


注:本文中的PoolPtr::reset方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。