TransMarket Group Interview Question: Why would I want to use a Sco... | Glassdoor

Interview Question

Trade Logic Developer Interview(Student Candidate) Chicago, IL

Why would I want to use a ScopeLock in a multi-threaded

  application instead of the standard: Mutex m; m.lock(); doSomething(); m.unlock();
technical, programming, c++

Interview Answer

1 Answer


If doSomething() throws an exception the mutex will never be unlocked, with a scope lock the lock is automatically unlocked when it goes out of scope.

Interview Candidate on May 15, 2014

Add Answers or Comments

To comment on this, Sign In or Sign Up.