Skip to content

Commit

Permalink
修改返回锁内代码的执行结果。
Browse files Browse the repository at this point in the history
  • Loading branch information
latrell committed Sep 14, 2018
1 parent 03f84ca commit e639f69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Latrell/Lock/GranuleStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function granule($key, Closure $callback)
{
try {
if ($this->acquire($key)) {
$callback();
return $callback();
} else {
throw new RuntimeException("Acquire lock key {$key} timeout!");
}
Expand Down

0 comments on commit e639f69

Please sign in to comment.