summaryrefslogtreecommitdiffstats
path: root/models/wiki.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-14 17:44:20 -0700
committerUnknwon <u@gogs.io>2016-08-14 23:52:24 -0700
commit660e7a178a9d72a03d13f704aca61726b4672232 (patch)
tree0668bcf438c586df14c204625b3829f5a4647267 /models/wiki.go
parent15845cb28763c1542556ad61d2aa9735541dbf45 (diff)
downloadgitea-660e7a178a9d72a03d13f704aca61726b4672232.tar.gz
gitea-660e7a178a9d72a03d13f704aca61726b4672232.zip
modules/sync: move sync objects to independent module
Diffstat (limited to 'models/wiki.go')
-rw-r--r--models/wiki.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/models/wiki.go b/models/wiki.go
index 89e9fdaa39..7a286f4ba3 100644
--- a/models/wiki.go
+++ b/models/wiki.go
@@ -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 {