Fix code to include unique_lock destructor