Re: [PATCH 0/2] Synchronous versions for asynchronous functions



On Mon, 2010-07-12 at 19:10 +0200, Iago Toral wrote:
> As I said in some other ocasion... why do we want the sync versions of
> the API? 
> Are they worth the extra effort/code? What kind of applications would
> use these 
> sync APIs? do we really want to target those applications?
> 

Because all asynchronous functions in GIO, and also in other components
too, have their synchronous counterparts. I think the same reasons to
have them can be applied here.

Besides of it, sync versions are easier to use than async versions.
Developers should have the freedom to choose if they prefer using sync
versions (easier but less efficient) than async versions. Very likely,
if I would develop a non-graphical applications, pretty sure that sync
versions would be enough for me.

In fact, when developing rygel-grilo I had to implement synchonous
version of browse and metadata, as the corresponding dbus call was
synchronous, and thus I had to return the answer at the call ending.

As I said, I think in this case code actually is worth the effort:
synchronous versions are very easy to implement, it does not require any
effort from plugins developers, and we get a more complete API.

	J.A.




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