Asynchronicity in D

Sean Kelly sean at invisibleduck.org
Fri Apr 1 08:21:22 PDT 2011


On Apr 1, 2011, at 7:49 AM, Jonas Drewsen wrote:

> On 01/04/11 01.07, dsimcha wrote:
>> 
>> 
>> Again forgive my naiveness, as most of my experience with concurrency is
>> concurrency to implement parallelism, not concurrency for its own sake.  Shouldn't
>> 32,000 threads be more than enough for anything?  I can't imagine what kinds of
>> programs would really need this level of concurrency, or how bad performance on
>> any specific thread would be when you have this many.  Right now in my Task
>> Manager the program with the most threads is explorer.exe, with 28.
> 
> There doesn't have to be a thread for each socket. Actually many servers have very few threads with many sockets each. 32000 sockets is not unimaginable for certain server loads e.g. websockets or game servers. But I know it is not that common.

Hopefully not at all common.  With that level of concurrency the process will spend more time context switching than executing code.


More information about the Digitalmars-d mailing list