From 996c389d8fc90afea52bd6ab3903a89c94380277 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 24 Sep 2017 12:36:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/cache/Driver.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/think/cache/Driver.php b/library/think/cache/Driver.php index 89b25b77..0b8a3212 100644 --- a/library/think/cache/Driver.php +++ b/library/think/cache/Driver.php @@ -120,9 +120,10 @@ abstract class Driver public function remember($name, $value, $expire = null) { if (!$this->has($name)) { - while ($this->has($name . '_lock')) { + $time = time(); + while ($time + 5 > time() && $this->has($name . '_lock')) { // 存在锁定则等待 - usleep(100000); + usleep(200000); } try {