Skip to content

Commit

Permalink
Extract SyncThreadsMax to separate variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Kubuxu committed Nov 4, 2016
1 parent 6a3d697 commit a7f487b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down

0 comments on commit a7f487b

Please sign in to comment.