Displaying 2 results from an estimated 2 matches for "nbd_internal_py_aio_pread_structur".
Did you mean:
nbd_internal_py_aio_pread_structured
2019 Jul 17
0
Re: [PATCH libnbd v2] examples: Include an example of integrating with the glib main loop.
...mpletion
nbd_aio_submit(cookie) => kicks off the command
Why do it this way? Because in the Python bindings, right now we have to
malloc() a C structure that tracks the Python Callable associated with
any Closure, and currently don't free that C struct until nbd_close.
Basically, we have:
nbd_internal_py_aio_pread_structured
data = malloc()
nbd_aio_pread_structured(, chunk_wrapper, data)
nbd_add_close_callback(data_free, data)
nbd_internal_py_aio_pread_structured_callback
data = malloc()
nbd_aio_pread_structured_callback(, chunk_wrapper, callback_wrapper, data)
nbd_add_close_callback(data_free, data)
whe...
2019 Jul 17
2
Re: [PATCH libnbd v2] examples: Include an example of integrating with the glib main loop.
On 7/17/19 8:00 AM, Richard W.M. Jones wrote:
> ---
> .gitignore | 1 +
> README | 2 +
> configure.ac | 9 +
> examples/Makefile.am | 22 ++
> examples/glib-main-loop.c | 511 ++++++++++++++++++++++++++++++++++++++
> 5 files changed, 545 insertions(+)
Looks good.
>
> + revents = g_source_query_unix_fd