[Vala] Combining async methods with external processes
- From: James Moschou <james moschou gmail com>
- To: vala-list gnome org
- Subject: [Vala] Combining async methods with external processes
- Date: Fri, 19 Nov 2010 18:04:46 +1030
Hello,
I want to perform a series of tasks one after the other, but in the
background. So I have:
async bool perform_tasks () {
bool result = yield task1 ();
if (result)
result = yield task2 ();
if (result)
result = yield task3 ();
Idle.add (perform_tasks.callback)
yield;
return result;
}
more or less.
One of the tasks however spawns a new process, and I'm not sure how
the callback from this process is supposed to fit into Vala's way of
doing async programming, i.e. Process.spawn_async_with_pipes () isn't
actually an "async" method.
How would I do this, am I making things too complicated?
Cheers,
James
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]