C++11 smart pointer, with thread safety.