Skip to content

Commit

Permalink
wemix: fixed incorrect spinlock
Browse files Browse the repository at this point in the history
  • Loading branch information
saddoc authored and sadoci committed Oct 18, 2022
1 parent 95e0ae6 commit 160dc79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wemix/spinlock.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type SpinLock struct {
}

func (l *SpinLock) Lock() {
for l.TryLock() {
for !l.TryLock() {
runtime.Gosched()
}
}
Expand Down

0 comments on commit 160dc79

Please sign in to comment.