From 2a7f20d8e4cd3603ae61096411b8635ecff6a978 Mon Sep 17 00:00:00 2001 From: Mark Holt Date: Wed, 10 Jul 2024 10:27:50 +0200 Subject: [PATCH] remove lock detector --- deferrwl.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deferrwl.go b/deferrwl.go index d398ccc538..bddaaf8aa1 100644 --- a/deferrwl.go +++ b/deferrwl.go @@ -1,10 +1,12 @@ package torrent +import "github.com/anacrolix/sync" + // Runs deferred actions on Unlock. Note that actions are assumed to be the results of changes that // would only occur with a write lock at present. The race detector should catch instances of defers // without the write lock being held. type lockWithDeferreds struct { - internal mu //sync.RWMutex + internal sync.RWMutex unlockActions []func() //lc atomic.Int32