jiangfucheng commented on code in PR #9909:
URL: https://github.com/apache/apisix/pull/9909#discussion_r1282939189


##########
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:
   Good idea. I have a question, can we use `ngx_thread_spawn` instead of 
`ngx_timer_at`? we need kill the `run_watch` thread when worker exited.
   
https://github.com/apache/apisix/blob/c89ec15e85eded367bdc5e03fa61ac5f6e53792d/apisix/core/config_etcd.lua#L269



-- 
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]

Reply via email to