cliffjansen commented on pull request #265:
URL: https://github.com/apache/qpid-proton/pull/265#issuecomment-659897035
The scenario I can envision is
Thread A calls pni_raw_connection_done(), resulting in a call to
rearm_polling().
Thread B is the poller and finds IO on the raw connection, sets
sched_io_events and ctx->sched_pending for the raw connection, then releases
the sched_mutex.
Thread A, still in pni_raw_connection_done(), now acquires the sched_mutex
and in unassign_thread() realizes there is remaining work to do so it places
itself on the proactor wake list to return eventually to process the io event.
Thread C becomes the raw connection's next runner via
pni_raw_connection_process(c, sched_wake), with sched_wake as true and
generates the PN_RAW_CONNECTION_WAKE. There may have been zero calls to
pn_raw_connection_wake() for the life of this raw connection.
You can also get an internal wake if certain errors are encountered in
pn_proactor_raw_connect(), but as I read the code, sched_wake is ignored in
pni_raw_connection_process() due to disconnect logic prior to the call to
if (sched_wake) pni_raw_wake(&rc->raw_connection);
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]