Re: [Vala] Further speculations on couroutines, generators and threads : Emulating Go's goroutines and channels in Vala
- From: Luca Bruno <lethalman88 gmail com>
- To: Jim Peters <jim uazu net>
- Cc: Serge Hulne <serge hulne gmail com>, 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 17:10:58 +0200
On Tue, Jul 12, 2011 at 07:43:14AM -0500, Jim Peters wrote:
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.
Do you have any benchmark? I wouldn't say that loudly in general.
--
http://www.debian.org - The Universal Operating System
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]