[Issue 11216] Make synchronized statement `nothrow`
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Feb 23 16:19:53 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=11216
--- Comment #11 from FeepingCreature <default_357-line at yahoo.de> ---
Istm a possible approach would be:
* Define SimpleMonitor : Monitor with nothrow
* change DMD to use nothrow when locking SimpleMonitors
* subclass druntime's Mutex with SimpleMutex : Mutex, SimpleMonitor
* use SimpleMutex as the mutex implementation for class monitors
Then synchronized(this) should be nothrow without breaking existing code that
depends on Mutex/Monitor. It would only break if you were assigning to
_monitor, and that's easily fixed by using a separate member.
I don't know how to implement this on the DMD side though.
--
More information about the Digitalmars-d-bugs
mailing list