function is `@nogc` yet allocates closures with the GC work around!

workman workman at
Tue Jan 11 15:47:58 UTC 2022

On Tuesday, 11 January 2022 at 13:32:58 UTC, Dennis wrote:
> On Tuesday, 11 January 2022 at 11:56:39 UTC, workman wrote:
>> Is there a workaround to made this work ?
> Make sure `doTask` takes a `scope` delegate.

To simple the question further:

step 1) A thread send the pointer into thread B by message

step 2) Thread B modify pointer value

step 3) Thread B send message to let Thread A know the work is 

step 4) Thread A read the pointer and get the value.  (in here 
Thread A always read the value updated by Thread B? )

More information about the Digitalmars-d mailing list