kgiusti commented on a change in pull request #1349:
URL: https://github.com/apache/qpid-dispatch/pull/1349#discussion_r695775137



##########
File path: src/router_core/router_core_thread.c
##########
@@ -213,25 +187,48 @@ void *router_core_thread(void *arg)
         //
         sys_mutex_lock(core->action_lock);
 
-        //
-        // Block on the condition variable when there is no action to do
-        //
-        while (core->running && DEQ_IS_EMPTY(core->action_list)) {
-            if (!router_core_process_background_action_LH(core))
-                sys_cond_wait(core->action_cond, core->action_lock);
+        for (;;) {
+            if (!DEQ_IS_EMPTY(core->action_list)) {

Review comment:
       I originally tried exactly that - it was slightly slower than doing the 
check before the move.  That lock is so heavily contended that *any* extra 
instructions run while holding the lock results in longer acquire times by the 
I/O threads.
   
   We should be good with initializing the local prior to entering the loop.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to