mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-08-04 12:21:57 +03:00
Allow for ff callbacks to be called by custom event implementations
The documentation says: > If the opaque user data requires free'ing when the handle is > unregistered, then a 2nd callback can be supplied for this purpose. > This callback needs to be invoked from a clean stack. If 'ff' > callbacks are invoked directly from the virEventRemoveHandleFunc they > will likely deadlock in libvirt. And they did deadlock. In removeTimeout too. Now we supply a custom function to pick it from the opaque blob and fire. Signed-off-by: Wojtek Porczyk <woju@invisiblethingslab.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
committed by
Daniel P. Berrange
parent
069269e896
commit
72e237f7b9
@ -349,7 +349,8 @@ for klass in gotfunctions:
|
||||
continue
|
||||
for func in sorted(gotfunctions[klass]):
|
||||
# These are pure python methods with no C APi
|
||||
if func in ["connect", "getConnect", "domain", "getDomain"]:
|
||||
if func in ["connect", "getConnect", "domain", "getDomain",
|
||||
"virEventInvokeFreeCallback"]:
|
||||
continue
|
||||
|
||||
key = "%s.%s" % (klass, func)
|
||||
|
Reference in New Issue
Block a user