Displaying 2 results from an estimated 2 matches for "nbd_aio_submit".
2019 Jul 17
0
Re: [PATCH libnbd v2] examples: Include an example of integrating with the glib main loop.
...off a callback), but
> it's worth thinking about.
An idea we had on IRC: instead of having nbd_aio_pread_callback which
both creates the cookie and submits the command with callback, we could
instead have: nbd_aio_pread(...) creates a command and returns a cookie
but does NOT send it; then nbd_aio_submit(nbd, cookie, callback, opaque)
which can be used to submit ANY nbd_aio_FOO command based on its cookie.
That solves the race for the callback ever being fired before the user
has had a chance to track the cookie, and makes it so that only one
command has to register callback functions (rather than...
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