Skip to content

Commit

Permalink
Merge pull request #55 from mailgun/thrawn/develop
Browse files Browse the repository at this point in the history
Fixed import
  • Loading branch information
thrawn01 authored Aug 29, 2019
2 parents d180a1d + 38320b9 commit c071a93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion v3/collections/expire_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"sync"
"time"

"github.com/mailgun/holster/v3/syncutil"
"github.com/pkg/errors"
)

Expand Down Expand Up @@ -139,7 +140,7 @@ func (c *ExpireCache) Peek(key interface{}) (value interface{}, ok bool) {
// Processes each item in the cache in a thread safe way, such that the cache can be in use
// while processing items in the cache
func (c *ExpireCache) Each(concurrent int, callBack func(key interface{}, value interface{}) error) []error {
fanOut := NewFanOut(concurrent)
fanOut := syncutil.NewFanOut(concurrent)
keys := c.Keys()

for _, key := range keys {
Expand Down
4 changes: 3 additions & 1 deletion v3/collections/lru_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import (
"container/list"
"sync"
"time"

"github.com/mailgun/holster/v3/syncutil"
)

// Holds stats collected about the cache
Expand Down Expand Up @@ -197,7 +199,7 @@ func (c *LRUCache) Peek(key interface{}) (value interface{}, ok bool) {
// while processing items in the cache. Processing the cache with `Each()` does not update
// the expiration or last used.
func (c LRUCache) Each(concurrent int, callBack func(key interface{}, value interface{}) error) []error {
fanOut := NewFanOut(concurrent)
fanOut := syncutil.NewFanOut(concurrent)
keys := c.Keys()

for _, key := range keys {
Expand Down

0 comments on commit c071a93

Please sign in to comment.