Basic version of try_acquire.