Skip to content

Commit

Permalink
remove sf.do
Browse files Browse the repository at this point in the history
  • Loading branch information
tejal29 committed Dec 7, 2020
1 parent faeb0c3 commit a380575
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkg/skaffold/util/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,10 @@ func (o *SyncStore) Exec(key string, f func() interface{}) interface{} {
}

// Store will store the results for a key in a cache
// It makes sure only one execution is in-flight for a given key at any time.
// This function is not safe to use if multiple subroutines store the
// result for the same artifact.
func (o *SyncStore) Store(key string, r interface{}) {
o.sf.Do(fmt.Sprintf("%s-put", key), func() (interface{}, error) {
o.results.Store(key, r)
return nil, nil
})
o.results.Store(key, r)
}

// NewSyncStore returns a new instance of `SyncStore`
Expand Down

0 comments on commit a380575

Please sign in to comment.