How multithreading works in hardware using D ==AND== difference b/w goroutine and threads in D

Dmitry Olshansky dmitry.olsh at gmail.com
Sun Nov 25 12:34:45 PST 2012


11/25/2012 11:54 PM, Sparsh Mittal пишет:
>>
>> In D's case, it depends. If you are making use of threading APIs
>> directly then you have 1:1 mapping to OS threads, but if you use actors
>> or std.parallelism module, then you have a N:1 mapping between tasks
>> and OS threads.
> Thanks a lot for your prompt reply.
>
> I am using: std.concurrency and core.thread. Then, I spawn threads as:
> spawn(&singleWorker, thisTid);
>
> So, would you tell which category (from what you told) my code falls into.
>

The real 1:1 OS thread. There was talk of using green threads for 
std.concurrency but it's not happening in the near future.


-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list