qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 10/10] nbd: Minimal structured read for clien


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-devel] [PATCH v2 10/10] nbd: Minimal structured read for client
Date: Wed, 11 Oct 2017 12:22:00 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

10.10.2017 18:00, Paolo Bonzini wrote:
On 10/10/2017 16:55, Vladimir Sementsov-Ogievskiy wrote:
Hmm, would it be simpler just pass a function pointer, which should be
called on each loop iteration?
So, we will return to one common func nbd_co_receive_reply, but with two
additional parameters: func and opaque?
Function pointers typically result in having to pass the state around in
a structure, for all the callers.

An iterator also has to package the state in a structure, but it is only
done once.

So function pointers would be simpler in the beginning, but would not
scale as well.

Paolo

Understand. OK, I'll try your suggestion.

--
Best regards,
Vladimir




reply via email to

[Prev in Thread] Current Thread [Next in Thread]