www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Automatically-created threads (just want to understand)

reply glathoud <glat glat.info> writes:
Hello,

after migrating a project from LDC 1.10.0 to 1.30.0, I now see 
(1) a significant speedup & less memory usage - many thanks for 
that - and (2) for each process (originally single-thread), up to 
1+N_CPU threads, which are active once in a while. These threads 
are automatically created, unless I am mistaken.

Just to understand: what are these threads for? Do they have 
anything to do with disk I/O? Something else?

Best regards,
Guillaume
Oct 12 2022
parent reply kinke <noone nowhere.com> writes:
On Thursday, 13 October 2022 at 05:56:47 UTC, glathoud wrote:
 Just to understand: what are these threads for? Do they have 
 anything to do with disk I/O? Something else?
Hi; these are created and used by the GC (by default), see https://dlang.org/changelog/2.087.0.html#gc_parallel.
Oct 13 2022
parent Guillaume Lathoud <gsub glat.info> writes:
On Thursday, 13 October 2022 at 09:32:45 UTC, kinke wrote:
 On Thursday, 13 October 2022 at 05:56:47 UTC, glathoud wrote:
 Just to understand: what are these threads for? Do they have 
 anything to do with disk I/O? Something else?
Hi; these are created and used by the GC (by default), see https://dlang.org/changelog/2.087.0.html#gc_parallel.
Thanks!
Oct 13 2022