Owuntu

About Computer Graphics and Game Development.

View My GitHub Profile

3 October 2021

Use std::lock_guard when possible

by

Use std::lock_guard when possible.

std::lock_guard is a RAII style lock that when current scope exit, the lock will automatically release, avoiding leaving mutex to be locked if exception occur in current scope.

tags: C++