]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Add comment on gotMetainfoC
authorMatt Joiner <anacrolix@gmail.com>
Mon, 12 May 2025 02:20:15 +0000 (12:20 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 12 May 2025 02:20:15 +0000 (12:20 +1000)
torrent.go

index 5e02c807e11d22919952de3afd74171b23eb7227..e780c80f83be9f5b1fd8d2c0f74d5368840fb835 100644 (file)
@@ -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{}