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

Re: [Xen-devel] FW: Cancelling asynchronous operations in libxl



Ian Campbell writes ("Re: [Xen-devel] FW: Cancelling asynchronous operations in 
libxl"):
> The way in which sequential async subops are currently handled (by
> chaining callbacks) is a bit ugly -- it leads to weird error messages
> like "libxl__vtpm_foo: Failed" which actually means "couldn't add a
> NIC" (because that was the previous step, and libxl__vtpm_foo is what
> picks up the result). Do you think it would be feasible to recast those
> as sequences of function pointers in an array with a central (common)
> dispatcher which steps through, handling and reporting errors?

Hmmm.  It might be.  There's a problem in that they all tend to have
different arguments.  And the control flow would be split into two
places.

Maybe it would be better to improve the error reporting to not rely on
the function name (which is TBH pretty pants anyway).

> If things could be restructured along those lines then adding
> cancellation support to the dispatcher might get us reasonably good API
> coverage pretty easily

Hmm.

Writing the control flow of all of these in a declarative style would
be difficult.  There are a lot of ifs and some parallel loops, as well
as simple sequential execution.

I think we would be in danger of writing a full-on coroutine system.
Maybe that wouldn't be such a bad idea.

Hmm.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.