Resource locker in Qt
There reason languages like Java has that feature is because they don't have RAII like C++ does.

I don't quite see how that is better than simply:

// Note: Braces for scope. "mutex" could optionally be declared static, or as a class member.
{ 
    QMutexLocker lock(&amp;mutex);

    /* code */
}