reddit discussion about Go turns to D again
dsimcha
dsimcha at yahoo.com
Sun May 15 09:49:38 PDT 2011
On 5/15/2011 12:21 PM, Sean Cavanaugh wrote:
> On 5/15/2011 11:04 AM, dsimcha wrote:
>> On 5/15/2011 11:41 AM, Robert Clipsham wrote:
>>> Automatically using a parallel algorithm if it's likely to improve
>>> speed? Awesome. I assume that std.parallelism sets up a thread pool upon
>>> program start so that you don't have the overhead of spawning threads
>>> when you use a parallel algorithm for the first time?
>>>
>>
>> No, it does so lazily. It seemed silly to me to do this eagerly when it
>> might never be used. If you want to make it eager all you have to do is
>> reference the taskPool property in the first line of main().
>>
>
> I haven't looked at the library in depth, but after taking a peek I'm
> left wondering how to configure the stack size. My concern is what to do
> if the parallel tasks are running out of stack, or (more likely) are
> given way too much stack because they need to 'handle anything'.
>
I never thought to make this configurable because I've personally never
needed to configure it. You mean the stack sizes of the worker threads?
I just use whatever the default in core.thread is. This probably errs
on the side of too big, but usually you're only going to have as many
worker threads as you have cores, so it's not much waste in practice.
If you really need this to be configurable, I'll add it for the next
release.
More information about the Digitalmars-d
mailing list