cliffjansen commented on code in PR #427: URL: https://github.com/apache/qpid-proton/pull/427#discussion_r1591273502
########## c/src/proactor/epoll.c: ########## @@ -1139,6 +1141,21 @@ static pn_event_batch_t *pconnection_process(pconnection_t *pc, uint32_t events, } if (sched_ready) schedule_done(&pc->task); + if (pc->first_schedule) { + // Normal case: resumed logic from pn_proactor_connect2. + // But possible tie: pn_connection_wake() or pn_proactor_disconnect(). Review Comment: Not a typo but obviously not clear. While the original logic is preserved as much as possible, the dropping of the task lock and context switch allows competitor threads that were not possible prior to this change. Either of those two calls are possible from an arbitrary thread between the setting of first_schedule and arriving at this code. A comment which doesn't make sense on its own is obviously not helpful. I will try to rework the comments and code structure for clarity on their own. -- 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: dev-unsubscr...@qpid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org