On 6/8/17 11:19 AM, Stanislav Blinov wrote:
On Thursday, 8 June 2017 at 14:13:53 UTC, Steven Schveighoffer wrote:void foo(Mutex m, Data d) pure { synchronized(m) { // ... manipulate d } // no guarantee m gets unlocked }Isn't synchronized(m) not nothrow?
You're right, it isn't. I actually didn't know that. Also forgot to make my function nothrow. Fixed:
void foo(Mutex m, Data d) pure nothrow
{
try
{
synchronized(m)
{
// .. manipulate d
}
}
catch(Exception)
{
}
}
-Steve
