# NoLock class · @imqueue/pg-pubsub

Source: https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.nolock/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-pubsub 3.0.5 — generated reference, not hand-written

Implements no lock to be used with multi-listener approach

**Signature:**

```typescript
export declare class NoLock implements AnyLock 
```
**Implements:** [AnyLock](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.anylock/)

## Methods


| Method | Modifiers | Description |
| --- | --- | --- |
| [acquire()](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.nolock.acquire/) |  | Always acquires, because it's no lock |
| [destroy()](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.nolock.destroy/) |  | Safely destroys this no lock |
| [dispose()](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.nolock.dispose/) |  | Frees no resources: no lock holds none |
| [init()](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.nolock.init/) |  | Init no lock |
| [isAcquired()](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.nolock.isacquired/) |  | Always acquired, because it's no lock |
| [onAcquire(handler)](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.nolock.onacquire/) |  | Registers nothing: [NoLock.acquire()](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.nolock.acquire/) always succeeds immediately, so there is no late takeover for the handler to report. |
| [onRelease(handler)](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.nolock.onrelease/) |  | Registers nothing: a no-op lock is never held, so it is never released and the handler could never fire. |
| [release()](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.nolock.release/) |  | Never releases, because it's no lock |

