Displaying 2 results from an estimated 2 matches for "nbd_set_free_".
2019 Jul 20
2
[libnbd] More thoughts on callbacks and more
More thoughts on callbacks, etc. following on from:
https://www.redhat.com/archives/libguestfs/2019-July/thread.html#00184
Closure lifetimes
-----------------
Closures could have a lifetime if we had a little bit of support from
the C library. We would generate (from C only):
nbd_set_free_<fn>_<closure> (nbd, free_closure);
which calls free_closure (user_data) as soon as the closure will no
longer be called by the library. This function would be used to
decrement the refcount from Python or remove the global root from
OCaml.
Note this is a family of functions, eg:
n...
2019 Jul 22
0
Re: [libnbd] More thoughts on callbacks and more
...etc. following on from:
> https://www.redhat.com/archives/libguestfs/2019-July/thread.html#00184
>
> Closure lifetimes
> -----------------
>
> Closures could have a lifetime if we had a little bit of support from
> the C library. We would generate (from C only):
>
> nbd_set_free_<fn>_<closure> (nbd, free_closure);
>
> which calls free_closure (user_data) as soon as the closure will no
> longer be called by the library. This function would be used to
> decrement the refcount from Python or remove the global root from
> OCaml.
>
> Note this...