[phobos] How close is D to having goroutines?

Jesse Phillips jesse.k.phillips at gmail.com
Sat Mar 1 16:38:54 PST 2014


On Fri, Feb 28, 2014 at 3:59 PM, Walter Bright <walter at digitalmars.com>wrote:

> The assumption is that D doesn't have them. But is that assumption true?
> There's been a lot of work on concurrent programming in D - how close are
> we to having a workalike to goroutines? Is it just a documentation issue?
>

Some time ago I had tried to mimic a example of Gorutines through the D
provided tools. The original Go code is no longer available, but IIRC the
std.concurrency version[1] was fairly close to what was done in Go. I also
wrote the same concept using std.parallelism[2]. Both of the programs have
been updated for the new std.datetime, though the concurrency version won't
compile because receive is unable to deduce parameter types.

rdmd callcenter.d 3 10 10 10

1. https://gist.github.com/JesseKPhillips/773979
2. https://gist.github.com/JesseKPhillips/774983

-- 
Jesse Phillips
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20140301/8bbc766d/attachment.html>


More information about the phobos mailing list