forked from TrueCloudLab/rclone
multipart: make pool buffer size public
This commit is contained in:
parent
5f66350331
commit
e686e34f89
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
bufferSize = 1024 * 1024 // default size of the pages used in the reader
|
BufferSize = 1024 * 1024 // BufferSize is the default size of the pages used in the reader
|
||||||
bufferCacheSize = 64 // max number of buffers to keep in cache
|
bufferCacheSize = 64 // max number of buffers to keep in cache
|
||||||
bufferCacheFlushTime = 5 * time.Second // flush the cached buffers after this long
|
bufferCacheFlushTime = 5 * time.Second // flush the cached buffers after this long
|
||||||
)
|
)
|
||||||
|
@ -33,7 +33,7 @@ func getPool() *pool.Pool {
|
||||||
bufferPoolOnce.Do(func() {
|
bufferPoolOnce.Do(func() {
|
||||||
ci := fs.GetConfig(context.Background())
|
ci := fs.GetConfig(context.Background())
|
||||||
// Initialise the buffer pool when used
|
// Initialise the buffer pool when used
|
||||||
bufferPool = pool.New(bufferCacheFlushTime, bufferSize, bufferCacheSize, ci.UseMmap)
|
bufferPool = pool.New(bufferCacheFlushTime, BufferSize, bufferCacheSize, ci.UseMmap)
|
||||||
})
|
})
|
||||||
return bufferPool
|
return bufferPool
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue