On 6/8/17 9:42 AM, Olivier FAURE wrote:
On Thursday, 8 June 2017 at 12:20:19 UTC, Steven Schveighoffer wrote:
Hm... if you locked an object that was passed in on the stack, for
instance, there is no guarantee the object gets unlocked.


This wouldn't be allowed unless the object was duplicated / created
inside the try block.

void foo(Mutex m, Data d) pure
{
   synchronized(m)
   {
        // ... manipulate d
   } // no guarantee m gets unlocked
}

-Steve

Reply via email to