method DurableObjectLock.prototype.release
DurableObjectLock.prototype.release(
key: string,
token: string
): Promise<void>

Releases a previously acquired lock.

A token that does not match the current holder is ignored by the object, so a caller whose claim already expired cannot release its successor's.

Parameters

key: string

The lock key

token: string

The token acquire returned

Return Type

Promise<void>

Throws

CloudflareUnsupportedError

When the Durable Object answers with a non-2xx status

Usage

import { DurableObjectLock } from "cloudflare-plugin/src/index.ts";