On Thursday, 18 July 2013 at 16:41:34 UTC, Jesse Phillips wrote:
I don't think this is really an answer, but awhile back I was
looking into the difference of D and Go for
parallel/concurrency and created these two examples[1][2] from
the blog
http://www.mprescient.com/journal/2011/1/9/concurrency-in-go-a-call-center-tutorial.html
1. https://gist.github.com/JesseKPhillips/773979
2. https://gist.github.com/JesseKPhillips/774983
The first is a translation to message passing, the second is
using std.parallelism
I think there is room for higher level APIs, but I don't think
we will see anything that resembles Goroutines being added.
Thanks for the examples, I'll have to take a look at them later!
I guess the different backgrounds is the reason for a lack of D
'goroutines', but parallelism seemed a good alternative.
Is the performance of parallelism and it's taskpools similar to
goroutines? It seems they both do the same thing (adding the
tasks to a queue, allocating them to a group of threads, etc),
but does the level of implementation (library vs language) mean a
speed difference?
Furthermore, is there a limit to the number of tasks that can be
spawned and performed in parallel? I know Rust allows for
hundreds, even thousands, of tasks to be executed "concurrently."
Thanks for the replies,
Matt.