This commit is contained in:
georgehao 2025-02-04 17:36:26 +08:00
parent 53dc219a81
commit 9fe0f42c03
No known key found for this signature in database

View file

@ -27,7 +27,7 @@ type ClosableMutex struct {
func NewClosableMutex() *ClosableMutex {
ch := make(chan struct{}, 1)
ch <- struct{}{}
return &ClosableMutex{ch: ch}
return &ClosableMutex{ch}
}
// TryLock attempts to lock cm.