When someone tries to acquire the lock using acquire, they receive a promise for a release callback. The promise
is fulfilled as soon as the previous lock owner invokes their release callback. If acquire is called after the
component is unmounted, the returned promise is never fulfilled.
Promise-based lock implementation.
When someone tries to acquire the lock using
acquire, they receive a promise for a release callback. The promise is fulfilled as soon as the previous lock owner invokes their release callback. Ifacquireis called after the component is unmounted, the returned promise is never fulfilled.