本文整理汇总了C++中PoolPtr::destroy方法的典型用法代码示例。如果您正苦于以下问题:C++ PoolPtr::destroy方法的具体用法?C++ PoolPtr::destroy怎么用?C++ PoolPtr::destroy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PoolPtr
的用法示例。
在下文中一共展示了PoolPtr::destroy方法的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.");
}
示例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);
}
示例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.");
}
示例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.");
}