Skip to content

Commit

Permalink
confirm MutexLock implements sync.Locker
Browse files Browse the repository at this point in the history
  • Loading branch information
subchen committed May 17, 2018
1 parent 1e2e961 commit 0197b60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions trylock.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package trylock

import (
"sync"
"sync/atomic"
"time"
)
Expand All @@ -18,6 +19,9 @@ type MutexLock struct {
ch chan struct{}
}

// confirm MutexLock implements sync.Locker
var _ sync.Locker = &MutexLock{}

// New returns a new MutexLock
func New() *MutexLock {
v := int32(0)
Expand Down

0 comments on commit 0197b60

Please sign in to comment.