apache / pulsar-client-python

Apache Pulsar Python client library
https://pulsar.apache.org/
Apache License 2.0
52 stars 43 forks source link

Fixed deadlock in producer.send_async #87

Closed merlimat closed 1 year ago

merlimat commented 1 year ago

Fix #84

Release the GIL while calling producer.sendAsync() to avoid a deadlock when PyBind is triggering the Python callback.

The problem is the different behavior in PyBind from Boost::Python.

We always need to make sure we release the GIL before making any call to C++ that potentially acquires any mutexes