This line doesn't do anything. What you wanted was:
    boost::unique_lock<boost::shared_mutex> lock(mutex_);