mirror of
https://gitee.com/zyjblog/oatpp.git
synced 2024-12-22 22:16:37 +08:00
Merge pull request #783 from linhaojun857/fix_Pool.hpp
fix function:createShared in PoolTemplate
This commit is contained in:
commit
0b3a66c47c
@ -353,10 +353,11 @@ public:
|
||||
|
||||
static std::shared_ptr<PoolTemplate> createShared(const std::shared_ptr<Provider<TResource>>& provider,
|
||||
v_int64 maxResources,
|
||||
const std::chrono::duration<v_int64, std::micro>& maxResourceTTL)
|
||||
const std::chrono::duration<v_int64, std::micro>& maxResourceTTL,
|
||||
const std::chrono::duration<v_int64, std::micro>& timeout)
|
||||
{
|
||||
/* "new" is called directly to keep constructor private */
|
||||
auto ptr = std::shared_ptr<PoolTemplate>(new PoolTemplate(provider, maxResources, maxResourceTTL.count()));
|
||||
auto ptr = std::shared_ptr<PoolTemplate>(new PoolTemplate(provider, maxResources, maxResourceTTL.count(), timeout));
|
||||
startCleanupTask(ptr);
|
||||
return ptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user