MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / Flush

Method Flush

extra/yassl/src/yassl_int.cpp:1844–1859  ·  view source on GitHub ↗

flush expired sessions from cache

Source from the content-addressed store, hash-verified

1842
1843// flush expired sessions from cache
1844void Sessions::Flush()
1845{
1846 Lock guard(mutex_);
1847 sess_iterator next = list_.begin();
1848 uint current = lowResTimer();
1849
1850 while (next != list_.end()) {
1851 sess_iterator si = next;
1852 ++next;
1853 if ( ((*si)->GetBornOn() + (*si)->GetTimeOut()) < current) {
1854 del_ptr_zero()(*si);
1855 list_.erase(si);
1856 }
1857 }
1858 count_ = 0; // reset flush counter
1859}
1860
1861
1862// remove a self thread error

Callers 1

SSL_flush_sessionsFunction · 0.80

Calls 7

lowResTimerFunction · 0.85
del_ptr_zeroClass · 0.85
GetBornOnMethod · 0.80
GetTimeOutMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected