This commit is contained in:
thinkphp
2017-09-24 12:36:42 +08:00
parent d114f59194
commit 996c389d8f

View File

@@ -120,9 +120,10 @@ abstract class Driver
public function remember($name, $value, $expire = null) public function remember($name, $value, $expire = null)
{ {
if (!$this->has($name)) { if (!$this->has($name)) {
while ($this->has($name . '_lock')) { $time = time();
while ($time + 5 > time() && $this->has($name . '_lock')) {
// 存在锁定则等待 // 存在锁定则等待
usleep(100000); usleep(200000);
} }
try { try {