[Issue 11216] New: Make synchronized statement `nothrow`
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 10 06:09:22 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11216
Summary: Make synchronized statement `nothrow`
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: druntime
AssignedTo: nobody at puremagic.com
ReportedBy: verylonglogin.reg at gmail.com
--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-10-10 17:09:20 MSD ---
Currently this code fails to compile because `_d_criticalenter` and
`_d_criticalexit` are not `nothrow`:
---
void f() nothrow
{ synchronized { } }
---
This is because user supplied monitor can throw as `lock`/`unlock` methods of
`Object.Monitor` are not `nothrow`.
Dependent druntime functions like `rt_attachDisposeEvent` and
`rt_detachDisposeEvent` are thus not `nothrow` too.
The proposal is to mark user supplied monitor `lock`/`unlock` methods also
`nothrow`. In the case it will be rejected documentation note about the fact
synchronized statement is not `nothrow` should be added.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list