kingluo commented on code in PR #9909: URL: https://github.com/apache/apisix/pull/9909#discussion_r1282685843
########## apisix/core/config_etcd.lua: ########## @@ -188,9 +191,36 @@ local function run_watch(premature) ::watch_event:: while true do - local res, err = res_func() - if log_level >= NGX_INFO then - log.info("res_func: ", inspect(res)) + local res + + local get_res_th = ngx_thread_spawn(function () Review Comment: The code is fine, but there is a slight impact on performance, because each res_func() will spawn a new thread, and this thread will exit after 50 seconds. So, is it feasible to run the whole run_watch() in one thread and watch for the exit signal in another thread? -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org