Thread-Multiplexing for D
Bienlein
jeti789 at web.de
Wed Oct 9 09:11:06 PDT 2013
On Wednesday, 9 October 2013 at 15:47:11 UTC, qznc wrote:
> On Wednesday, 9 October 2013 at 13:36:41 UTC, Bienlein wrote:
>> The "thread-multiplexing" in Go is described here:
>>
>> https://docs.google.com/document/d/1TTj4T2JO42uD5ID9e89oa0sLKhJYD0Y_kqxDv3I3XMw/edit
>>
>> The sources are here:
>>
>> http://code.google.com/p/go/source/browse/src/pkg/runtime/proc.c?r=01acf1dbe91f673f6308248b8f45ec0564b1d751
>>
>> It should be possible to takes this approach from Go and bring
>> it
>> to D. Just an idea ...
>
> Is this different to task parallelism as implemented in
> std.parallelism [0]?
>
> The downside of D is that the rest of system is not integrated.
> For example, if you do a blocking syscall then the threadpool
> is not increased to compensate for the blocked thread.
>
> [0] http://dlang.org/phobos/std_parallelism.html
Yes, right. This is the big difference between CSP-style channels
in Go compared to libdispatch in Apple's C/C++.
More information about the Digitalmars-d
mailing list