You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "zbentley (via GitHub)" <gi...@apache.org> on 2023/02/01 15:31:54 UTC
[GitHub] [pulsar-client-python] zbentley commented on a diff in pull request #87: Fixed deadlock in producer.send_async
zbentley commented on code in PR #87:
URL: https://github.com/apache/pulsar-client-python/pull/87#discussion_r1093384774
##########
src/producer.cc:
##########
@@ -34,6 +34,16 @@ MessageId Producer_send(Producer& producer, const Message& message) {
return messageId;
}
+void Producer_sendAsync(Producer& producer, const Message& msg, SendCallback callback) {
+ Py_BEGIN_ALLOW_THREADS
+ producer.sendAsync(msg, callback);
+ Py_END_ALLOW_THREADS
+
+ if (PyErr_CheckSignals() == -1) {
Review Comment:
What if an exception was already set in the interpreter global before the callback fired?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org