[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [Vala] Proposal for asynchronous DBus calls.
- From: "Sam Liddicott" <sam liddicott com>
- To: Christian Hergert <christian hergert gmail com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Proposal for asynchronous DBus calls.
- Date: Fri, 17 Oct 2008 09:05:41 +0100
* Christian Hergert wrote, On 17/10/08 08:06:
> This isn't totally applicable, but I thought I'd mention it before too
> much more async voodo.
>
> I've been working on an asynchronous toolkit library for GObject so
> that once we get "yield return/yield break" support I can implement my
> ideas I posted earlier.
>
> The library is called GTask and can be found on github[1]. For a
> quick, totally out of context example:
>
> var task = new Task (_ => {
> debug ("im in worker thread");
> });
>
> task.add_callback (_ => {
> debug ("im in main thread, by default");
> });
>
> task.add_errback (_ => {
> debug ("i can resolve an asynchronous error");
> });
>
> You can build complex callback/errback chains just like in Python
> Twisted. By default, the task scheduler will dispatch callbacks and
> errbacks from the main thread to ease locking hell for GUI
>
This looks a similar pattern to that used in samba's composite connect;
I think it is useful.
How will shared variables be expressed?
Sam
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]