named arguments, string interpolation, please stop.
Guillaume Piolat
first.name at gmail.com
Thu Jan 11 20:19:37 UTC 2024
On Thursday, 11 January 2024 at 17:56:51 UTC, deadalnix wrote:
> Having thread that are not managed by the GC is a fine thing to
> want, but you got to do it the other way around by detaching
> the thread from the GC.
No I need to do it the current way, by using system API to create
threads like with any other language runtime. Also how would you
create a thread in betterC else?
The rule for unattached threads differently is that their stack
is not traced and unrealiable to stay alive. So either they just
borrow GC memory while it's pointer elsewhere, either they don't
use GC memory.
The issues arise when you let a unattached thread be the sole
owner of GC memory created by a legitimate registered thread, and
yes it's very awkward and unfamiliar but well if you were using
Java you wouldn't expect pthread_create to register to the Java
runtime.
More information about the Digitalmars-d
mailing list