Skip to main content

api.concurrencyLimit()

Acquires an instance-scoped concurrency token. Notes:
  • Returns whether admission succeeded; ttl is in seconds.
  • Each successful admission acquires one slot. Release it exactly once with releaseConcurrencyLimit.
  • Stored durably per instance with a separate owner and expiry for each admitted slot.
  • Without leaseOwnerId, release through the same runtime invocation that acquired the slot.
  • For separate SDK requests, pass a unique leaseOwnerId for this execution to acquisition and release. Reusing that owner renews neither its TTL nor business idempotency. Finish before TTL.
  • Durable storage unavailability throws before admission; an optional cache is not required.
  • Unavailable with readOnly: true (throws an error).

Signature

Example

See all api methods or runtime basics.
Last modified on November 8, 2026