mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 23:55:35 +08:00
update to 2.3.1 version (build 388)
cleanup code and fix a bug
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php /** @noinspection PhpUnused */
|
||||
|
||||
|
||||
namespace ZM\Store\Lock;
|
||||
@@ -29,7 +29,7 @@ class SpinLock
|
||||
}
|
||||
}
|
||||
|
||||
public static function tryLock(string $key) {
|
||||
public static function tryLock(string $key): bool {
|
||||
if (($r = self::$kv_lock->incr($key, 'lock_num')) > 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user