Warn about using the GC

cc cc at nevernet.com
Thu Jan 18 14:44:13 UTC 2024


On Sunday, 14 January 2024 at 13:32:14 UTC, Alexandru Ermicioi 
wrote:
> On Sunday, 14 January 2024 at 12:32:26 UTC, Richard (Rikki) 
> Andrew Cattermole wrote:
>>
>> But it is not a complete solution that is suitable for all 
>> scenarios.
>>
>> This is not an either/or situation. We can have both solutions 
>> as different attributes.
>
> Perhaps there should be a `@trustedgc`, similar to 
> what`@trusted` is in safe system?
> That would fix callback issue.
>
> Best regards,
> Alexandru.

I've wanted something like this for a while.  An 
@IAcknowledgeTheGCMayBeUsedHere (brevify this).  I experimented a 
bit (for fun) with making a locking GC that required deliberate 
unlocking prior to any attempt to allocate but solving the 
recursion problem made it stop being fun.


More information about the Digitalmars-d mailing list