www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Detached thread in D

reply Ish <ratta1i cmich.edu> writes:
I am comping from C and POSIX threads. It is possible to start a 
posix thread in detached state by setting the arribute of 
thread_create to PTHREAD_CREATE_DETACHED
to recover the resources as soon as the thread terminates. Allows 
a large number of
threads to be created. Is there some thing similar in thread or 
fibers in D? Sample code will be appreciated.
Nov 11 2015
next sibling parent Daniel Kozak via Digitalmars-d <digitalmars-d puremagic.com> writes:
Post it to the learn mailing list. There will be someone who can help you.

Dne 11. 11. 2015 17:30 napsal u=C5=BEivatel "Ish via Digitalmars-d" <
digitalmars-d puremagic.com>:
 I am comping from C and POSIX threads. It is possible to start a posix
thread in detached state by setting the arribute of thread_create to PTHREAD_CREATE_DETACHED
 to recover the resources as soon as the thread terminates. Allows a large
number of
 threads to be created. Is there some thing similar in thread or fibers in
D? Sample code will be appreciated.

Nov 11 2015
prev sibling parent extrawurst <stephan extrawurst.org> writes:
On Wednesday, 11 November 2015 at 16:28:24 UTC, Ish wrote:
 I am comping from C and POSIX threads. It is possible to start 
 a posix thread in detached state by setting the arribute of 
 thread_create to PTHREAD_CREATE_DETACHED
 to recover the resources as soon as the thread terminates. 
 Allows a large number of
 threads to be created. Is there some thing similar in thread or 
 fibers in D? Sample code will be appreciated.
--Stephan
Nov 11 2015