| Thread overview | |||||
|---|---|---|---|---|---|
|
November 11, 2015 Detached thread in D | ||||
|---|---|---|---|---|
| ||||
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. | ||||
November 11, 2015 Re: Detached thread in D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Ish Attachments:
| Post it to the learn mailing list. There will be someone who can help you. Dne 11. 11. 2015 17:30 napsal uživatel "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. > > | |||
November 11, 2015 Re: Detached thread in D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Ish | 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. http://dlang.org/phobos/core_thread.html#.thread_detachInstance ? --Stephan | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply