Re: [Vala] Further speculations on couroutines, generators and threads : Emulating Go's goroutines and channels in Vala
- From: Jim Peters <jim uazu net>
- To: Serge Hulne <serge hulne gmail com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Further speculations on couroutines, generators and threads : Emulating Go's goroutines and channels in Vala
- Date: Tue, 12 Jul 2011 07:43:14 -0500
Serge Hulne wrote:
Here is a further development of the idea of Luca Bruno about a Vala
implementation for Generators:
Simulating Go's goroutines and channels in Vala:
Basically the idea is to start as many threads as needed (which play the
role of Go' goroutines) and to recuperate their output from a "Generator"
(which plays the role of the "Go" channel form which the result from a given
thread can be pulled):
Threads are very heavy compared to an optimised implementation of
'goroutines' or whatever. Certainly you can emulate them but it's not
going to be an efficient way of implementing algorithms unless someone
puts in the work to make it efficient under the hood.
If convenience matters more than efficiency, then no problem.
Jim
--
Jim Peters (_)/=\~/_(_) jim uazu net
(_) /=\ ~/_ (_)
UazĂș (_) /=\ ~/_ (_) http://
in Peru (_) ____ /=\ ____ ~/_ ____ (_) uazu.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]