1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

doc: add documention for keyed locker

This commit is contained in:
dudaodong
2025-04-28 19:32:51 +08:00
parent f7ada6093c
commit 093f4a2286
3 changed files with 791 additions and 1 deletions

View File

@@ -219,7 +219,6 @@ func ExampleKeyedLocker_Do() {
fmt.Println("Task successfully executed.")
}
// 再次尝试获取同一把锁,任务会被阻塞,直到释放锁
ctx2, cancel2 := context.WithTimeout(context.Background(), 3*time.Second)
defer cancel2()