kgiusti commented on a change in pull request #1027:
URL: https://github.com/apache/qpid-dispatch/pull/1027#discussion_r575488021



##########
File path: src/message.c
##########
@@ -2891,3 +2911,21 @@ int qd_message_stream_data_append(qd_message_t *message, 
qd_buffer_list_t *data)
     qd_compose_free(field);
     return rc;
 }
+
+
+void qd_message_set_Q2_unblocked_handler(qd_message_t *msg,
+                                         qd_message_Q2_unblocked_handler_t 
callback,
+                                         const qd_alloc_safe_ptr_t *ptr)

Review comment:
       Yeah, I've refactored this a bit.   I'm not crazy about passing in an 
actual pointer as the context and having the callback also take a pointer.  
This API would infer that the pointer passed in is handed back, which it isn't.
   
   I want to avoid a pointer  here because that raises ownership issues, 
possibly cross threads.  I chose instead a pass by value API so it's clear that 
ownership of the safe pointer is not transferred but copied.




----------------------------------------------------------------
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]

Reply via email to