| 6 | namespace acl { |
| 7 | |
| 8 | keeper_conns::keeper_conns(const keeper_config& config, const char* addr) |
| 9 | : last_peek_(0) |
| 10 | , last_trigger_(0) |
| 11 | , config_(config) |
| 12 | , addr_(addr) |
| 13 | { |
| 14 | acl_ring_init(&linker_); |
| 15 | |
| 16 | // pre-create fibers to connect server first |
| 17 | for (int i = 0; i < config_.conn_max; i++) { |
| 18 | keeper_link* lk = new keeper_link; |
| 19 | lk->fb = new keeper_conn(config_, addr_, lk, *this); |
| 20 | ACL_RING_APPEND(&linker_, &lk->me); |
| 21 | lk->fb->start(); |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | keeper_conns::~keeper_conns() |
| 26 | { |
nothing calls this directly
no test coverage detected