Re: [Nbd] libnbd
- To: folkert <folkert@...421...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] libnbd
- From: Goswin von Brederlow <goswin-v-b@...186...>
- Date: Mon, 29 Apr 2013 10:17:31 +0200
- Message-id: <20130429081731.GB6252@...1266...>
- In-reply-to: <20130425153813.GE1464@...855...>
- References: <516FBEB3.3070806@...112...> <20130425121417.GB15210@...1266...> <20130425153813.GE1464@...855...>
On Thu, Apr 25, 2013 at 05:38:14PM +0200, folkert wrote:
> > Externally, for the user, I would make them objects with callbacks and
> > default functions. For example the device would have callbacks for
>
> Please: do NEVER use callbacks.
> They are a pain to support and only usefull in UI applications.
>
> Folkert van Heusden
Callbacks are just function pointers, a type like any other. They are
as easy to support as any other non trivial type.
And since the plan is to have the libnbd invoke code according to
circumstane there really is no other way than callbacks. Wether they
are hidden in the definition of a state machine, set individually as
hooks or collectively through a struct of function pointers is all the
same. There will be callbacks.
MfG
Goswin
Reply to: