[Vala] Fwd: Question about a basic coroutine example
- From: Luca Dionisi <luca dionisi gmail com>
- To: vala-list <vala-list gnome org>
- Subject: [Vala] Fwd: Question about a basic coroutine example
- Date: Sat, 9 Jul 2011 09:55:47 +0200
---------- Forwarded message ----------
From: Luca Dionisi <luca dionisi gmail com>
Date: Sat, Jul 9, 2011 at 9:55 AM
Subject: Re: [Vala] Question about a basic coroutine example
To: Nor Jaidi Tuah <norjaidi tuah ubd edu bn>
On Sat, Jul 9, 2011 at 1:36 AM, Nor Jaidi Tuah <norjaidi tuah ubd edu bn> wrote:
Once again, if you really need a cooperative multitasking in your app
(which by the way is not bad, unlike the cooperative multitasking in
the entire operating system that was m$ windows 3.11) you should
consider to give a try to GNU Pth. Otherwise, use threads.
Can you elaborate on the features that make GNU Pth
preferable to using async (or perhaps glib thread).
My impression is that GNU Pth is simply a portable
implementation of thread.
Coroutines and threads are different. Look at the manual for a good
introduction.
http://www.gnu.org/software/pth/pth-manual.html
As for vala async support, I tried using it. When you have a
more-than-banal scenario it's a mess.
Especially if you want to implement a custom scheduler. Say you want
to be able to pass the schedule to a specific task (such as for a
generator).
Async support in vala is just not meant to provide generic support for
coroutines.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]