How many std.concurrency receivers?

Russel Winder russel at winder.org.uk
Thu Oct 11 00:37:58 PDT 2012


On Thu, 2012-10-11 at 09:09 +0200, thedeemon wrote:
> On Thursday, 11 October 2012 at 02:21:01 UTC, Charles Hixson 
> wrote:
> > I haven't been able to get an idea of how many std.concurrency 
> > receivers is reasonable.
> 
> Currently in std.concurrency each "receiver" lives in its own OS 
> thread, so they are very expensive, 4-10 is fine, 100 may be 
> possible but expensive in terms of RAM and CPU cycles, 1000 is 
> probably too much.

In the beginning processors weren't doing enough so processes were
invented. Processes were too expensive so threads were invented. Now
threads are too expensive. How the world goes round :-)

More constructively: there is an implication here that each receiver is
bound explicitly and permanently to a thread. I would have thought the
step would be de-couple receiver and thread, run a thread pool and then
dynamically bind to receivers as needed.

I haven't read the earlier emails in the thread nor checked the code so
I may be way off with the above. Apologies if so.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20121011/ad5228ec/attachment-0001.pgp>


More information about the Digitalmars-d-learn mailing list