3.
Mutex m = new Mutex;
lock(m);
scope(exit) unlock(m);