MCPcopy Create free account
hub / github.com/asternic/wuzapi / ForUser

Method ForUser

helpers.go:130–134  ·  view source on GitHub ↗
(userID string)

Source from the content-addressed store, hash-verified

128}
129
130func NewUserSemaphoreManager() *UserSemaphoreManager {
131 return &UserSemaphoreManager{}
132}
133
134func (usm *UserSemaphoreManager) ForUser(userID string) chan struct{} {
135 // LoadOrStore provides an atomic way to get or create a semaphore.
136 pool, _ := usm.pools.LoadOrStore(userID, make(chan struct{}, openGraphUserFetchLimit))
137 return pool.(chan struct{})

Callers 1

getOpenGraphDataFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected