});
#endif /* HAVE_LIBSSL */
- luaCtx.writeFunction("newThread", [](const std::string& code) {
+ luaCtx.writeFunction("newThread", [client, configCheck](const std::string& code) {
+ if (client || configCheck) {
+ return;
+ }
std::thread newThread(LuaThread, code);
newThread.detach();
});
Spawns a separate thread running the supplied code.
Code is supplied as a string, not as a function object.
+ Note that this function does nothing in 'client' or 'config-check' modes.
.. function:: submitToMainThread(cmd, dict)