I need to program an application that manages a pool of connection. I would like to know which algorithms should be studied.
A typical Pool implementation would have a free bucket stack:
This favors re-use of the last used connection, which is good for caching.
When giving a connection to the user, you'll use RAII so that it'll get back to the Pool automatically (and deterministically) when all references to it are dropped.
Now, it's up to you to decide how to handle the events:
Those are implementation details of your pool and should be adapted depending on your requirements.