Skip to content

Feature Request: Singletons and Pool with limits #170

@pjebs

Description

@pjebs
  1. 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
  2. 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.
  3. I also can't work out how to create singletons so Invoke always returns the same object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions