Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8a1c932

Browse filesBrowse files
bug #44820 [Cache] Don't lock when doing nested computations (nicolas-grekas)
This PR was merged into the 4.4 branch. Discussion ---------- [Cache] Don't lock when doing nested computations | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #41130 | License | MIT | Doc PR | - Commits ------- be8cbd2 [Cache] Don't lock when doing nested computations
2 parents 9d8638c + be8cbd2 commit 8a1c932
Copy full SHA for 8a1c932

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/Cache/LockRegistry.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/LockRegistry.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public static function compute(callable $callback, ItemInterface $item, bool &$s
8888

8989
$key = self::$files ? abs(crc32($item->getKey())) % \count(self::$files) : -1;
9090

91-
if ($key < 0 || (self::$lockedFiles[$key] ?? false) || !$lock = self::open($key)) {
91+
if ($key < 0 || self::$lockedFiles || !$lock = self::open($key)) {
9292
return $callback($item, $save);
9393
}
9494

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.