zbentley edited a comment on issue #6463:
URL: https://github.com/apache/pulsar/issues/6463#issuecomment-910743817


   @merlimat I suggest solving it in Python: have producer objects, when 
created, store a Python-side reference to the Client that created them. 
Python's cyclic garbage collector should be able to appropriately handle that 
cleanup, in python 3 at least. The cyclic GC works "all right", not perfectly, 
in Python 2, but is much improved in 3. I think this can be done without 
changes in the native code.
   
   EDIT this might be what you're proposing above, in which case I'm sorry for 
the duplication.
   
   That's not quite idiomatic, but the typical Python conventions for this kind 
of thing (use contextmanagers for producers/consumers) would require a larger 
refactor to the driver and would break back compatibility. 


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


Reply via email to