Asynchronicity in D

Jonas Drewsen jdrewsen at nospam.com
Fri Apr 1 13:02:03 PDT 2011


On 01/04/11 18.12, dsimcha wrote:
> == Quote from Sean Kelly (sean at invisibleduck.org)'s article
>> 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.
>
> ...or use such huge timeslices that the illusion of simultaneous execution breaks
> down.

  I guess multiple cores will help out there.


More information about the Digitalmars-d mailing list