October 10, 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@puremagic.com
        ReportedBy: verylonglogin.reg@gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg@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: -------
October 10, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11216



--- Comment #1 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-10-10 17:14:31 MSD ---
Also in the case in the description are there any possibilities to supply a user monitor? If not, this subcase is clearly a "rejects-valid" bug.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------