From: Matt Joiner Date: Mon, 16 May 2016 16:12:06 +0000 (+1000) Subject: Improve the note about chunk writing concurrency X-Git-Tag: v1.0.0~718 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=cf55055d12e8894e54947389d6f2e6e1af91db65;p=btrtrc.git Improve the note about chunk writing concurrency Everytime I see memory spike I suspect this, and it isn't it. --- diff --git a/client.go b/client.go index c92f7c2c..44298663 100644 --- a/client.go +++ b/client.go @@ -1816,7 +1816,8 @@ func (cl *Client) downloadedChunk(t *Torrent, c *connection, msg *pp.Message) { } cl.mu.Unlock() - // Write the chunk out. + // Write the chunk out. Note that the upper bound on chunk writing + // concurrency will be the number of connections. err := t.writeChunk(int(msg.Index), int64(msg.Begin), msg.Piece) cl.mu.Lock()