Renamed try_take_lock for clarity.