archiver: Remove cleanup goroutine from BufferPool

This isn't doing anything. Channels should get cleaned up by the GC when
the last reference to them disappears, just like all other data
structures. Also inlined BufferPool.Put in Buffer.Release, its only
caller.
This commit is contained in:
greatroar
2022-05-29 17:07:37 +02:00
parent dde8e9e296
commit 0db1d11b2e
2 changed files with 15 additions and 50 deletions

View File

@@ -76,7 +76,7 @@ func NewFileSaver(ctx context.Context, t *tomb.Tomb, save SaveBlobFn, pol chunke
s := &FileSaver{
saveBlob: save,
saveFilePool: NewBufferPool(ctx, int(poolSize), chunker.MaxSize),
saveFilePool: NewBufferPool(int(poolSize), chunker.MaxSize),
pol: pol,
ch: ch,