Run an inexpensive test before attempting to acquire the lock.