mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-01 19:37:45 +08:00
Compiling one demo ok.
This commit is contained in:
parent
7729ab3fe5
commit
69045352d6
@ -29,6 +29,6 @@ void ipc_monitor::check_idle(void)
|
||||
for (std::vector<acl::connect_pool*>::iterator it = pools.begin();
|
||||
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);
|
||||
|
||||
/**
|
||||
* 检查连接池中空闲的连接,释放过期连接
|
||||
* @param ttl {time_t} 该值 >= 0 时,过期时间大于此值的连接将被关闭
|
||||
* @param exclusive {bool} 内部是否需要加锁
|
||||
* @return {size_t} 返回被释放空闲连接个数
|
||||
*/
|
||||
size_t check_idle(time_t ttl, bool exclusive = true);
|
||||
|
||||
/**
|
||||
* 检查连接池中空闲的连接,释放过期连接(过期时间使用 set_idle_ttl() 设置的值)
|
||||
* @param exclusive {bool} 内部是否需要加锁
|
||||
@ -117,14 +125,6 @@ public:
|
||||
*/
|
||||
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 表示检测所有连接
|
||||
|
Loading…
Reference in New Issue
Block a user