Shared and race conditions

Wanderer d-wanderer at hitbts.com
Wed Nov 29 16:30:18 UTC 2017


On Wednesday, 29 November 2017 at 16:19:05 UTC, Michael wrote:
> On Wednesday, 29 November 2017 at 16:13:13 UTC, Wanderer wrote:
>> [...]
>
> I unfortunately cannot answer your question but I am noticing 
> that running the code with DMD gives you an unordered sequence 
> of IDs, but running with DMD-nightly gives you a sequence in 
> the correct order. I wonder what has changed to do with threads 
> that causes this difference between compiler versions.

The "unordered" output is completely fine, as I assume runtime 
does not guarantee the order of execution of logical threads 
(order is different between ldc and dmd as well).


More information about the Digitalmars-d-learn mailing list