Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
proton-c-0.17.0
-
None
Description
Change ownership model for pn_connection_t and pn_listener_t managed by the proactor: instead of proactor freeing automatically after the final event, the user must free on or after the final event.
There are 2 basic use cases:
1. Free connection/listener immediately on the last event.
2. Keep connection/listener in memory until all application pointers are cleaned up.
Proactor ownership does 1. very well, but makes 2. very difficult without
exposing reference-counts.
User ownership supports both reasonably easily: 1. is implemented by calling pn_connection_free() or pn_listener_free() in the event handler on the last event.
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Resolved [ 5 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
Commit a85c89ac8c1b8a19fae0b32cab6549e8d9d1ce24 in qpid-proton's branch refs/heads/master from aconway
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=a85c89a ]
PROTON-1445: Change proactor ownership modelChanged ownership model for pn_connection_t and pn_listener_t managed by the
proactor: instead of proactor freeing automatically after the final event, the
user must free on or after the final event.
There are 2 basic use cases:
1. Free connection/listener immediately on the last event.
2. Keep connection/listener in memory until all application pointers are cleaned up.
Proactor ownership does 1. very well, but makes 2. very difficult without
exposing reference-counts.
User ownership supports both reasonably easily: 1. is implemented by calling
pn_connection_free() or pn_listener_free() in the event handler on the last
event.