|
Lightweight 0.20260303.0
|
#include <Pool.hpp>
Classes | |
| class | PooledDataMapper |
Public Member Functions | |
| Pool () | |
| ~Pool () noexcept=default | |
| Pool (Pool const &)=delete | |
| Pool & | operator= (Pool const &)=delete |
| Pool (Pool &&)=delete | |
| Pool & | operator= (Pool &&)=delete |
| PooledDataMapper | Acquire () |
| PooledDataMapper | Acquire () |
A thread-safe pool of DataMapper instances with the policy configured by the PoolConfig template parameter. The pool allows acquiring and returning DataMapper instances, and manages the lifecycle of these instances according to the specified growth strategy.
|
inlineexplicit |
|
defaultnoexcept |
Default destructor, the pool manages the lifecycle of the data mappers, so no special cleanup is needed bug be aware that any acquired data mappers that are not returned to the pool will be destroyed when the pool is destroyed, which may lead to resource leaks if not handled properly
|
inline |
|
inline |
Function to acquire a data mapper from the pool, the behavior of this function depends on the growth strategy this is a specific implementation for the strategies that do not block, which always creates a new data mapper if the pool is empty, regardless of the maximum capacity