std.concurrency, or me?
jessekphillips+D at gmail.com
Tue Jan 11 14:09:58 PST 2011
I still haven't come to any conclusions, and made quite a mess trying to add on work completed messages.
So I decided to make the next one which uses the soon to be std.parallelism.
And the disappointment there is that parallel foreach doesn't seem to work with a standard ForwardRange. Otherwise it works as expected.
Jesse Phillips Wrote:
> Reddit let me to this article walking through an example of Goroutines. I figured it could look about the same in D. So I set out to learn some multi-threading. And what I ended up with had an issue.
> The mailbox size seems to be extremely small. Currently I have set the size to 10,000 and put a OnCrowding.throwException, though I wanted it to block, changing it will result in a program that won't exit, and it will not have finished processing all the calls. The last option of ignoring will result in many calls not being finished.
> This is tested no Linux, but I will test it on Windows tomorrow. I am running it with:
> ./callcenter 3 10 10 10
> which says, 3 agents, 10 calls, with a maximum of 10 secs to process a call, and 10 ticks before creating the next call.
> 1. http://www.mprescient.com/journal/2011/1/9/concurrency-in-go-a-call-center-tutorial.html
> 2. https://gist.github.com/773979
More information about the Digitalmars-d-learn