MCPcopy Create free account
hub / github.com/acl-dev/acl / timer_callback

Method timer_callback

lib_acl_cpp/src/stream/aio_timer_delay_free.cpp:33–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33void aio_timer_delay_free::timer_callback(unsigned int /* id */)
34{
35 std::set<aio_delay_free*>::iterator it, next;
36 for (it = gc_set_.begin(); it != gc_set_.end(); it = next) {
37 next = it;
38 ++next;
39 if (!(*it)->locked()) {
40 (*it)->destroy();
41 gc_set_.erase(it);
42 }
43 }
44
45 // �����¼������Ƿ��������ظ���ʱ�����̣����ñ���ʱ������
46 if (!gc_set_.empty()) {
47 handle_.set_timer(this, 100000, DELAY_TIMER_ID);
48 } else {
49 handle_.del_timer(this, DELAY_TIMER_ID);
50 }
51}
52
53bool aio_timer_delay_free::add(aio_delay_free* callback)
54{

Callers

nothing calls this directly

Calls 7

beginMethod · 0.80
lockedMethod · 0.80
set_timerMethod · 0.80
del_timerMethod · 0.80
endMethod · 0.45
destroyMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected