http://d.puremagic.com/issues/show_bug.cgi?id=2890
Summary: std.stdio.write family blocks on file lock Product: D Version: 2.029 Platform: PC OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: Phobos AssignedTo: bugzi...@digitalmars.com ReportedBy: graham.stj...@internode.on.net In multi-threaded applications, File.LockingTextWriter is not correctly locking/unlocking the underlying FILE* handle, resulting in deadlocks. The more trace prints you put in to find the problem, the worse it gets. The problem seems to be related to recent dmd bug-fixes, and I worked around it with the following change. It looks like LockingTextWriter needs to be revisited, maybe by reinstating the non-hacked implementation. $ diff dmd/src/phobos/std/stdio.d stdio.d 922c922 < //return LockingTextWriter(this); --- > return LockingTextWriter(this); 925,926c925,926 < auto result = LockingTextWriter(this); < return result; --- > //auto result = LockingTextWriter(this); > //return result; --