Acquires a resource and performs a state change atomically, and then guarantees that if the resource is acquired (and the state changed), a release action will be called.
Makes a new promise.