How to have multiple synchronized shared types. Programming in D, page 647

Ali Çehreli acehreli at yahoo.com
Mon Sep 1 01:46:05 UTC 2025


On 8/31/25 3:52 AM, Steven Schveighoffer wrote:

 >  From the book:
 >
 >> Note: This feature is not supported by dmd 2.098.1.

What I meant there was "not yet; maybe in the future."

 > Which is why I recommend removing the whole discussion.

Fair.

 > If you want to ensure some order of locking you need to do it manually.
 > Even before 2.098.1

Ensuring order of locking is not something that the programmer *may* 
want. The hardcoded order of two synchronized blocks is a program bug 
because it leads to a deadlock.

Ali



More information about the Digitalmars-d-learn mailing list