modules/sync: move sync objects to independent module

This commit is contained in:
Unknwon
2016-08-14 17:44:20 -07:00
parent 15845cb287
commit 660e7a178a
5 changed files with 131 additions and 100 deletions

View File

@ -12,19 +12,16 @@ import (
"path"
"path/filepath"
"strings"
"sync"
"github.com/Unknwon/com"
"github.com/gogits/git-module"
"github.com/gogits/gogs/modules/setting"
"github.com/gogits/gogs/modules/sync"
)
var wikiWorkingPool = &workingPool{
pool: make(map[string]*sync.Mutex),
count: make(map[string]int),
}
var wikiWorkingPool = sync.NewSingleInstancePool()
// ToWikiPageURL formats a string to corresponding wiki URL name.
func ToWikiPageURL(name string) string {