瀏覽代碼

Add a note not to create a CivetServer instance with a static constructor in a Windows DLL

See #264
bel 9 年之前
父節點
當前提交
27a56bbe3e
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      include/CivetServer.h

+ 5 - 0
include/CivetServer.h

@@ -207,6 +207,11 @@ class CIVETWEB_API CivetServer
 	 * It is good practice to call getContext() after this in case there
 	 * It is good practice to call getContext() after this in case there
 	 * were errors starting the server.
 	 * were errors starting the server.
 	 *
 	 *
+	 * Note: CivetServer should not be used as a static instance in a Windows
+	 * DLL, since the constructor creates threads and the destructor joins
+	 * them again (creating/joining threads should not be done in static
+	 * constructors).
+	 *
 	 * @param options - the web server options.
 	 * @param options - the web server options.
 	 * @param callbacks - optional web server callback methods.
 	 * @param callbacks - optional web server callback methods.
 	 *
 	 *