You can clone with
HTTPS or Subversion.
There seems to be no way to delete a pool (i.e. delete all resources in a pool), because there is no way to know how many allocated resources there are in a pool. I could try to apply takeResource/destroyResource over and over, but there's no way to know when to stop. If I could query for the number of allocated resources, then I would know when to stop.
My use case is that the size of the resource pool may change at runtime, so I need to create a new pool and destroy all resources in the old pool. However, if resource-pool supported changing the size at runtime, then I could just use that instead of destroying and creating the pool.
@pheaver, we could support changing the size of the pool at runtime by making the maxResources an IORef Int.
What do you think should happen when you lower the maxResources below the inUse counter of one of the stripes? What happens to the idle resources? What happens to the taken resources? What happens when the taken resources are put back into the pool?
Hi, I'm not using this package anymore, so I don't have any opinions about this feature :).