简体   繁体   English

如何停止Vibe.D应用程序?

[英]How to stop a Vibe.D application?

Does Vibe.D have a build-in terminate function, for when the library is run through a static initializer? 对于通过静态初始化程序运行库时,Vibe.D是否具有内置的终止功能? I want to terminate the application when vibe.d throws an exception when for example opening a file. 我想在vibe.d例如打开文件时引发异常时终止应用程序。

I have a server listening using the listenHTTP function. 我有一个使用listenHTTP函数进行监听的服务器。

Try getEventDriver().exitEventLoop(); 尝试getEventDriver().exitEventLoop(); , from here and here . ,从这里这里

EDIT: There's a simpler version, the standalone function vibe.core.core.exitEventLoop . 编辑:有一个更简单的版本,独立函数vibe.core.core.exitEventLoop

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM