kingluo commented on code in PR #9909: URL: https://github.com/apache/apisix/pull/9909#discussion_r1275675442
########## apisix/core/config_etcd.lua: ########## @@ -188,9 +190,43 @@ 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 sema, err = semaphore.new() + if not sema then + log.error("create sema failed", err) + goto watch_event + end + + local get_res_th = ngx_thread_spawn(function () Review Comment: @leslie-tsang I'm concerned that each watch will spawn two threads, which will affect performance. What if we check exiting() after the watch has timed out? It's currently 50 seconds, maybe we should lower it? -- 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