the preferred way to lock is using a scoped lock:
boost::mutex::scoped_lock slock(offset_map_lock_);