[Issue 16057] [TDPL] synchronized (a, b) compiles and runs with wrong semantics
https://issues.dlang.org/show_bug.cgi?id=16057 mhh changed: What|Removed |Added Status|NEW |RESOLVED CC||maxha...@gmail.com Resolution|--- |FIXED --- Comment #3 from mhh --- Since around dmd ~2.078, one cannot use the comma operator at all so this particular construct is no longer an issue See https://run.dlang.io/is/EL9foO --
[Issue 16057] [TDPL] synchronized (a, b) compiles and runs with wrong semantics
https://issues.dlang.org/show_bug.cgi?id=16057 yebblieschanged: What|Removed |Added CC||simen.kja...@gmail.com --- Comment #2 from yebblies --- *** Issue 18277 has been marked as a duplicate of this issue. *** --
[Issue 16057] [TDPL] synchronized (a, b) compiles and runs with wrong semantics
https://issues.dlang.org/show_bug.cgi?id=16057 ZombineDevchanged: What|Removed |Added Keywords||safe CC||petar.p.ki...@gmail.com --
[Issue 16057] [TDPL] synchronized (a, b) compiles and runs with wrong semantics
https://issues.dlang.org/show_bug.cgi?id=16057 --- Comment #1 from Andrei Alexandrescu--- Test code (thanks Steve Schveighoffer) should not print "oops!" but does: import std.concurrency; import core.sync.mutex; import core.thread; import std.stdio; __gshared Mutex a; __gshared Mutex b; shared static this() { a = new Mutex; b = new Mutex; } void badThread() { synchronized(a) { writeln("a is locked!"); while(1) { Thread.sleep(1.seconds); } } } void main() { spawn(); Thread.sleep(1.seconds); synchronized(a, b) { writeln("oops!"); } } --