You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a package called: https://github.com/rocketlaunchr/go-pool. It is a thin wrapper around a sync.Pool but with the ability to limit how many times an item can be taken from the pool. If all items are taken from the pool, it blocks until an item gets put back into the pool
I can't figure out how to use this package so that when Invoke, I can set it up so it pulls an item from the Pool and/or blocks when the limit is reached.
I also can't work out how to create singletons so Invoke always returns the same object.
sync.Poolbut with the ability to limit how many times an item can be taken from the pool. If all items are taken from the pool, it blocks until an item gets put back into the pool