mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-05 05:18:53 +08:00
Merge branch 'gitee-master' into gitlab-upstream
This commit is contained in:
commit
c52bb82780
@ -29,6 +29,6 @@ void ipc_monitor::check_idle(void)
|
|||||||
for (std::vector<acl::connect_pool*>::iterator it = pools.begin();
|
for (std::vector<acl::connect_pool*>::iterator it = pools.begin();
|
||||||
it != pools.end(); ++it)
|
it != pools.end(); ++it)
|
||||||
{
|
{
|
||||||
(*it)->check_idle(ttl_);
|
(*it)->check_idle((time_t) ttl_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -100,6 +100,14 @@ public:
|
|||||||
*/
|
*/
|
||||||
void put(connect_client* conn, bool keep = true);
|
void put(connect_client* conn, bool keep = true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查连接池中空闲的连接,释放过期连接
|
||||||
|
* @param ttl {time_t} 该值 >= 0 时,过期时间大于此值的连接将被关闭
|
||||||
|
* @param exclusive {bool} 内部是否需要加锁
|
||||||
|
* @return {size_t} 返回被释放空闲连接个数
|
||||||
|
*/
|
||||||
|
size_t check_idle(time_t ttl, bool exclusive = true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查连接池中空闲的连接,释放过期连接(过期时间使用 set_idle_ttl() 设置的值)
|
* 检查连接池中空闲的连接,释放过期连接(过期时间使用 set_idle_ttl() 设置的值)
|
||||||
* @param exclusive {bool} 内部是否需要加锁
|
* @param exclusive {bool} 内部是否需要加锁
|
||||||
@ -117,14 +125,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
size_t check_idle(time_t ttl, bool kick_dead, bool exclusive = true);
|
size_t check_idle(time_t ttl, bool kick_dead, bool exclusive = true);
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查连接池中空闲的连接,释放过期连接
|
|
||||||
* @param ttl {time_t} 该值 >= 0 时,过期时间大于此值的连接将被关闭
|
|
||||||
* @param exclusive {bool} 内部是否需要加锁
|
|
||||||
* @return {size_t} 返回被释放空闲连接个数
|
|
||||||
*/
|
|
||||||
size_t check_idle(time_t ttl, bool exclusive = true);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测连接状态,并关闭断开连接,内部自动加锁保护
|
* 检测连接状态,并关闭断开连接,内部自动加锁保护
|
||||||
* @param count {size_t} 检测的连接个数,缺省值为 0 表示检测所有连接
|
* @param count {size_t} 检测的连接个数,缺省值为 0 表示检测所有连接
|
||||||
|
Loading…
Reference in New Issue
Block a user