Skip to content

PrefixedMutexTrait ​

Type
Trait
Namespace
craft\mutex
Since
3.6.0
Deprecated in
in 3.7.15. [[MutexTrait]] should be used instead.

View source

Public Properties ​

PropertyDescription
namePrefixstring – A string prefixed to every lock name.

namePrefix ​

Type
string
Default value
''

A string prefixed to every lock name. This can be used to avoid lock conflicts if multiple applications are sharing the same database connection.

View source

Public Methods ​

MethodDescription
acquire()
isAcquired()
release()

acquire() ​

View source

Arguments ​

Returns ​

boolean

isAcquired() ​

View source

Arguments ​

Returns ​

boolean

release() ​

View source

Arguments ​

Returns ​

boolean