Lock
interface Lock (View source)
Methods
mixed
get(callable|null $callback = null)
Attempt to acquire the lock.
mixed
block(int $seconds, callable|null $callback = null)
Attempt to acquire the lock for the given number of seconds.
bool
release()
Release the lock.
string
owner()
Returns the current owner of the lock.
void
forceRelease()
Releases this lock in disregard of ownership.
Details
mixed
get(callable|null $callback = null)
Attempt to acquire the lock.
mixed
block(int $seconds, callable|null $callback = null)
Attempt to acquire the lock for the given number of seconds.
bool
release()
Release the lock.
string
owner()
Returns the current owner of the lock.
void
forceRelease()
Releases this lock in disregard of ownership.
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.