From f569b2c1a76808b987175f8dec286b1dd7e94b9d Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Mon, 12 May 2025 12:20:15 +1000 Subject: [PATCH] Add comment on gotMetainfoC --- torrent.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/torrent.go b/torrent.go index 5e02c807..e780c80f 100644 --- a/torrent.go +++ b/torrent.go @@ -148,7 +148,8 @@ type Torrent struct { metadataCompletedChunks []bool metadataChanged sync.Cond - // Closed when .Info is obtained. + // Closed when .Info is obtained. This could be chansync.SetOnce but we already have sync around + // IsSet from nameMu. Switching will probably only increase memory use. gotMetainfoC chan struct{} readers map[*reader]struct{} -- 2.51.0