[Libguestfs] Libnbd asynchronous API with epoll
Tage Johansson
tage.j.lists at posteo.net
Fri Jul 7 08:58:50 UTC 2023
On 7/6/2023 7:06 PM, Nir Soffer wrote:
>
> - After calling for example aio_notify_read(3), can I know that the
> next reading from the file descriptor would block?
>
> No, you have to call again aio_get_direction() and poll again until
> the event happens.
>
Well, what I mean is:
After calling aio_notify_read, if aio_get_direction returns
AIO_DIRECTION_READ or AIO_DIRECTION_BOTH, can I know that the reading on
the file descriptor actually blocked? Or might there be cases when
aio_notify_read returns and the next direction includes a read and there
is still more data to read on the file descriptor?
I guess this is the case, but I must know or the client may hang
unexpectedly.
Best regards,
Tage
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20230707/bdfb0fa2/attachment.htm>
More information about the Libguestfs
mailing list