diff options
Diffstat (limited to 'util/ringlog/ringlog.go')
| -rw-r--r-- | util/ringlog/ringlog.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/ringlog/ringlog.go b/util/ringlog/ringlog.go index 62dfbae5b..781e8f5ca 100644 --- a/util/ringlog/ringlog.go +++ b/util/ringlog/ringlog.go @@ -8,9 +8,11 @@ import "tailscale.com/syncs" // New creates a new [RingLog] containing at most max items. func New[T any](max int) *RingLog[T] { - return &RingLog[T]{ + rl := &RingLog[T]{ max: max, } + syncs.RegisterMutex(&rl.mu, "ringlog.RingLog.mu") + return rl } // RingLog is a concurrency-safe fixed size log window containing entries of [T]. |
