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



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?

Personally, I don't have convincing answers for these questions and that's why, 
at least for me, providing sync versions of the APIs is not interesting at the 
moment... I feel like we are increasing the number of interfaces and code to 
maintain without a good reason for that.

Iago

On Mon, 12 Jul 2010 14:33:56 +0200, "Juan A. Suarez Romero"
<jasuarez igalia com> wrote:
> Hi everybody!
> 
> These patches add synchronous versions to grl_media_source_metadata() and
> grl_media_source_browse() functions for free. In this case, "for free" means
> that plugin developer does not need to deal with a specific synchronous
> function; she just implement the asynchronous callback, as it is done so far,
> and Grilo core will provide a synchronous version on top of the asynchronous
> one.
> 
> Right now, as I said, this proposal just covers metadata() and browse()
> functions. If feature goes ahead, I'll add support for remaining functions
> (query(), search(), and s on) where it makes sense.
> 
> It's worth to note that the synchronous function does not completely blocks
> everthing; rather it works like gtk_dialog_run(): while waiting for results to
> come, idle functions and signals are still executed and received. So there will
> no problem with blocking UI.
> 
> As example, grl_media_source_browse() returns a GList with the results.
> 
> As usual, any comment is welcome.
> 
> 	J.A.
> 
> 
> Juan A. Suarez Romero (2):
>   core: Add synchronous version of grl_media_source_metadata() function
>   core: Add synchronous version of grl_media_source_browse() function
> 
>  src/grl-media-source.c |  177 ++++++++++++++++++++++++++++++++++++++++++++++++
>  src/grl-media-source.h |   15 ++++
>  2 files changed, 192 insertions(+), 0 deletions(-)
> 
> _______________________________________________
> grilo-list mailing list
> grilo-list gnome org
> http://mail.gnome.org/mailman/listinfo/grilo-list


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