bneradt commented on code in PR #13045:
URL: https://github.com/apache/trafficserver/pull/13045#discussion_r3089031271
##########
plugins/lua/ts_lua.cc:
##########
@@ -827,6 +827,47 @@ globalHookHandler(TSCont contp, TSEvent event ATS_UNUSED,
void *edata)
return 0;
}
+static int
+shutdownHookHandler(TSCont contp, TSEvent /* event ATS_UNUSED */, void * /*
edata ATS_UNUSED */)
+{
+ ts_lua_instance_conf *const conf = (ts_lua_instance_conf
*)TSContDataGet(contp);
+
+ for (int index = 0; index < conf->states; ++index) {
+ ts_lua_main_ctx *const main_ctx = &ts_lua_g_main_ctx_array[index];
+
+ TSMutexLock(main_ctx->mutexp);
Review Comment:
I think the existing ts_lua_reload_module grabs a lock like this in a
similar way already?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]