Thread in detached state?

Ish via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Nov 20 06:50:49 PST 2015


On Thursday, 19 November 2015 at 22:07:19 UTC, ZombineDev wrote:
> On Friday, 13 November 2015 at 15:35:11 UTC, Ish wrote:
>> [...]
>
> If you're more familiar with pthreads, you can just use them 
> from core.sys.posix.pthread [1]. After all this what 
> core.thread uses on Posix [2]. In general you can use any OS 
> functionality by importing the declarations you need from 
> core.sys.[OS].[header] [3]. However you need to make sure to 
> register your thread if you are going to use features of D that 
> need runtime support (such as the GC).
>
> [...]

Well I was trying to see how many threads could be created by a 
process. Linux has limit of 380 joinable threads (POSIX) per 
process. OS runs out of resources at this point. To increase the 
limit one has to recover the resources right away when a thread 
terminates. I will look into the links that you posted. Thanks 
for answering my query.


More information about the Digitalmars-d-learn mailing list