diff --git a/sync.go b/sync.go index 825de99..bf38c16 100644 --- a/sync.go +++ b/sync.go @@ -10,7 +10,9 @@ import ( // in case of two used disks per write (RAID 1, 5) and queue depth of 2, // 16 concurrent Sync calls should be able to saturate 16 HDDs RAID //TODO: benchmark it out, maybe provide tweak parmeter -var syncSemaphore chan struct{} = make(chan struct{}, 16) +const SyncThreadsMax = 16 + +var syncSemaphore chan struct{} = make(chan struct{}, SyncThreadsMax) func syncDir(dir string) error { if runtime.GOOS == "windows" {