Skip to main content

Interface: IThreadLease

Defined in: internal/thread-store/types.ts:541

The busy mark of a thread: one call at a time runs on it (D77). Stored on the thread, so it holds across servers and outlives nothing: a lease whose expiresAt has passed counts as free.

ThreadStore.acquireLease gives it out, ThreadStore.releaseLease takes it back; AIGateway holds it for the length of a call.

Properties​

expiresAt​

expiresAt: Date

Defined in: internal/thread-store/types.ts:545

When the lease frees itself (leaseMs after it was taken), should the call never release it.


token​

token: string

Defined in: internal/thread-store/types.ts:543

Identifies the call that holds the lease; only it can release the lease.