From 12c3ac119fbd2d483dcc0f7a63f514fc68ffdb5c Mon Sep 17 00:00:00 2001 From: Lina Wolf <48202465+linawolf@users.noreply.github.com> Date: Sun, 13 Oct 2024 07:31:06 +0200 Subject: [PATCH] [Preport] Fix non blocking locking example (#4814) (#4815) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Thomas Heilmann <1016315+theilm@users.noreply.github.com> Co-authored-by: Chris Müller <2566282+brotkrueml@users.noreply.github.com> --- Documentation/ApiOverview/LockingApi/Index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/ApiOverview/LockingApi/Index.rst b/Documentation/ApiOverview/LockingApi/Index.rst index 1aad0589e9..20328f9d71 100644 --- a/Documentation/ApiOverview/LockingApi/Index.rst +++ b/Documentation/ApiOverview/LockingApi/Index.rst @@ -191,7 +191,7 @@ Acquire and use an exclusive, non-blocking lock: // now use the locker to lock something exclusively, this will not block, so handle retry / abort yourself, // e.g. by using a loop - if ($locker->acquire(LockingStrategyInterface::LOCK_CAPABILITY_EXCLUSIVE)) { + if ($locker->acquire(LockingStrategyInterface::LOCK_CAPABILITY_EXCLUSIVE | LockingStrategyInterface::LOCK_CAPABILITY_NOBLOCK)) { // ... some work to be done that requires locking // after you did your stuff, you must release