[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v5 04/10] libxl: convert libxl_device_disk_add to an asyn op
Roger Pau Monne writes ("Re: [PATCH v5 04/10] libxl: convert
libxl_device_disk_add to an asyn op"):
> Can't we remove _init, if it's not needed? Having and _init function
> makes people thing they have to use it, and the comments doesn't say
> anything about _wait calling _init itself.
_init is needed to provide a way to initialise the structure so that
it is safe to pass to _cancel. This means that caller can use
idempotent initialisation and cleanup, which avoids leaks and logic
This is the same way it's done for many other of the event functions,
Feel free to provide a comment clarifying the API.
Xen-devel mailing list