Re: [Vala] [ANNOUNCE] Vala 0.5.1 - Compiler for the GObject type system
- From: "Christian Hergert" <christian hergert gmail com>
- To: "Jürg Billeter" <j bitron ch>
- Cc: vala-list gnome org
- Subject: Re: [Vala] [ANNOUNCE] Vala 0.5.1 - Compiler for the GObject type system
- Date: Sun, 23 Nov 2008 01:31:28 -0800
I'm excited about the addition of yielding values. I released GTask 0.1.2 last week which is an asynchronous/concurrency library for GObject with similar feel to twisted deferreds. I would love to be able to yield tasks and have the method re-enter when the task has completed.
Something like this ..
void do_something () yields
{
// result populated on re-entrance with task's value (g_task_get_result()).
// also, could throw exception on re-entrance if task errored allowing for async try/catch
var result = yield new Task<string> (_ => { return some_sync_operation (); });
stdout.printf ("Result was %s\n", result);
}
-- Christian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]