[ 
https://issues.apache.org/jira/browse/PROTON-2247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17159721#comment-17159721
 ] 

ASF GitHub Bot commented on PROTON-2247:
----------------------------------------

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:
us...@infra.apache.org


> [c] Proactor API to support 'raw' TCP connections using the proactor event 
> loop
> -------------------------------------------------------------------------------
>
>                 Key: PROTON-2247
>                 URL: https://issues.apache.org/jira/browse/PROTON-2247
>             Project: Qpid Proton
>          Issue Type: New Feature
>          Components: proton-c
>            Reporter: Andrew Stitcher
>            Assignee: Andrew Stitcher
>            Priority: Major
>             Fix For: proton-c-0.32.0
>
>
> There are applications that use amqp together with some other protocol (http 
> for example). It is currently difficult to combine other TCP use with amqp 
> use when using proton and the proactor.
> It will be useful to be able to combine using 'raw' TCP connections with AMQP 
> connections in a single proactor event loop.
> This will allow you to write application combining multiple protocols with 
> AMQP without having to use multiple event loops and hence probably threads.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to