# AcquiredLock type · @imqueue/rpc

Source: https://imqueue.org/api/rpc/latest/rpc.acquiredlock/
Published: 2026-08-04
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/rpc 3.5.3 — generated reference, not hand-written

What [IMQLock.acquire()](https://imqueue.org/api/rpc/latest/rpc.imqlock.acquire/) resolves to: the literal `true` when this caller acquired the lock and must perform the work, or the value the lock holder passed to [IMQLock.release()](https://imqueue.org/api/rpc/latest/rpc.imqlock.release/) when this caller had to wait.

**Signature:**

```typescript
export type AcquiredLock<T> = T | boolean;
```

## Remarks

Because the acquired case is the literal `true`, it cannot be told apart from a resolved value of `true`. Always use [IMQLock.locked()](https://imqueue.org/api/rpc/latest/rpc.imqlock.locked/) immediately after awaiting to decide whether you are the holder — never inspect the returned value.

