You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Andrew Stitcher (JIRA)" <ji...@apache.org> on 2017/03/16 14:55:42 UTC
[jira] [Commented] (PROTON-1440) pn_connection_wake to return bool
status
[ https://issues.apache.org/jira/browse/PROTON-1440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15928210#comment-15928210 ]
Andrew Stitcher commented on PROTON-1440:
-----------------------------------------
Currently the app *can* call it on any valid connection (assuming my fix to zero out the PROACTOR context object to a connection on pconnection destruction), but it won't do anything if the connection is not being serviced by a proactor.
So this behaviour is safe-ish, but the app doesn't know that its wake won't do anything.
> pn_connection_wake to return bool status
> ----------------------------------------
>
> Key: PROTON-1440
> URL: https://issues.apache.org/jira/browse/PROTON-1440
> Project: Qpid Proton
> Issue Type: Improvement
> Components: proton-c
> Affects Versions: 0.17.0
> Reporter: Alan Conway
> Assignee: Alan Conway
> Fix For: 0.18.0
>
>
> pn_connection_wake() allows any thread to send a PN_CONNECTION_WAKE event to a proactor-managed connection. Currently it does not return any value, and the application must ensure it is not called after the PN_TRANSPORT_CLOSED event is processed for that connection.
> This is tricky for the application to synchronize and inconsistent with other pn_connection_ functions. If refcounts are used to keep a pn_connection_t in memory after the TRANSPORT_CLOSED, then calling wake() is an error even though the pn_connection_t is valid.
> Change wake to be safe as long as the pn_connection_t is valid. It returns true if the connection will be woken, false if it is too late.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org