merlimat opened a new pull request, #87:
URL: https://github.com/apache/pulsar-client-python/pull/87
Fix #84
Release the GIL while calling `producer.sendAsync()` to avoid a deadlock
when PyBind is triggering the Python callback.
* Main Thread
1. Holds the Python GIL
2. Call `producer.send_async()`
3. Tries to acquire internal `ClientConnetion` lock
* Pulsar client internal thread
1. Holds lock on `ClientConnection`
2. Receives ack from the broker
3. Triggers callback
4. PyBind11 acquires GIL <---- Deadlock
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
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]