Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Lock] Add max wait time to acquire #54942

Open
@thedomeffm

Description

@thedomeffm

Description

The acquiring of a lock can be "blocking" (which is false by default).

Similiar to the ttl parameter of the lock I would love to see a "maxWaitTime" on acquire (only used when "blocking: true")

e.g.

$lock = $factory->createLock('pdf-creation');
$lock->acquire(blocking: true, blockingMaxWaitTime: 20 /*seconds*/);

When the lock could not be acquired in 20 seconds a LockAcquiringException is thrown.

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions