Closed mipac closed 6 years ago
Hi @mipac interesting suggestions. Currently the pool does not support the features you request. However, I think it should be possible to add the features you are thinking about - by adding logic to the allocator function. I.e. you can use a custom allocator which will check for both the current size of the pool and wait for resources if non are available.
Although the waiting part would require some threading which I'm guessing should be ok, if you use a lock policy. But, if you run into problems we can try to take a look.
I'm closing this issue, but feel free to re-open or open a new one with additional questions.
thx a lot for your answer I'll give a try sure it's possible, but I'm not sure to produce a code as elegant as yours!
Hi,
how can I add a finite size to the pool? pool.allocate should have a "timed" overload, to wait for a freed resource when the limit is reached