Skip to content

Commit

Permalink
feat:支持在等待时取消获取锁
Browse files Browse the repository at this point in the history
  • Loading branch information
whuanle committed Dec 23, 2023
1 parent b453045 commit 170e516
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FreeRedis/RedisClient/Modules/Lock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public LockController Lock(string name, int timeoutSeconds, int refrshTimeoutSec
{
return new LockController(this, name, value, timeoutSeconds, refrshTimeoutSeconds, autoDelay, token);
}

if (token.IsCancellationRequested) return null;
Thread.CurrentThread.Join(millisecondsTimeout: 3);
}
return null;
Expand Down

0 comments on commit 170e516

Please sign in to comment.