www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11216] New: Make synchronized statement `nothrow`

reply d-bugmail puremagic.com writes:
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



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: -------
Oct 10 2013
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11216




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: -------
Oct 10 2013