std.concurrency, or me?

Jesse Phillips jessekphillips+D at
Mon Jan 10 20:05:45 PST 2011

Reddit let me to this article walking through an example of Goroutines[1]. 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[2] 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.


More information about the Digitalmars-d-learn mailing list