named arguments, string interpolation, please stop.
deadalnix
deadalnix at gmail.com
Thu Jan 11 17:56:51 UTC 2024
On Thursday, 11 January 2024 at 14:55:46 UTC, IGotD- wrote:
> On Thursday, 11 January 2024 at 14:54:47 UTC, IGotD- wrote:
>> On Thursday, 11 January 2024 at 13:07:52 UTC, deadalnix wrote:
>>>
>>> - D runtime is unable to see thread started manually (for
>>> instance with pthread-create) leading to all kind of bizarre
>>> behavior.
>>
>> Threads that are manually created can be attached by using
>>
>> ThreadT thread_attachThis_tpl(ThreadT)();
>
> Should be:
>
> Thread thread_attachThis();
But that doesn't work. If a GC cycle kicks in in between the
thread starting and you having the chance to attach it, you may
end up collecting live objects. This is what killed the project,
BTW.
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.
More information about the Digitalmars-d
mailing list