Massively reduce CPU when Readers are blocked on unavailable data

This commit is contained in:
Matt Joiner 2017-02-01 16:28:16 +11:00
parent c66c4d1744
commit 1d54b1c6d8
2 changed files with 0 additions and 2 deletions

View File

@ -98,7 +98,6 @@ func (r *Reader) tickleClient() {
func (r *Reader) waitReadable(off int64) {
// We may have been sent back here because we were told we could read but
// it failed.
r.tickleClient()
r.t.cl.event.Wait()
}

1
t.go
View File

@ -36,7 +36,6 @@ func (t *Torrent) NewReader() (ret *Reader) {
t: t,
readahead: 5 * 1024 * 1024,
}
ret.pieces = ret.piecesUncached()
t.addReader(ret)
return
}