pva2pva 1.4.2
Loading...
Searching...
No Matches
ChannelCache::cacheClean Struct Reference
Inheritance diagram for ChannelCache::cacheClean:
Collaboration diagram for ChannelCache::cacheClean:

Public Member Functions

 cacheClean (ChannelCache *c)
epicsTimerNotify::expireStatus expire (const epicsTime &currentTime)

Public Attributes

ChannelCache * cache

Detailed Description

Definition at line 102 of file chancache.cpp.

Constructor & Destructor Documentation

◆ cacheClean()

ChannelCache::cacheClean::cacheClean ( ChannelCache * c)
inline

Definition at line 105 of file chancache.cpp.

105: cache(c) {}

Member Function Documentation

◆ expire()

epicsTimerNotify::expireStatus ChannelCache::cacheClean::expire ( const epicsTime & currentTime)
inline

Definition at line 106 of file chancache.cpp.

107 {
108 // keep a reference to any cache entrys being removed so they
109 // aren't destroyed while cacheLock is held
110 std::set<ChannelCacheEntry::shared_pointer> cleaned;
111
112 {
113 Guard G(cache->cacheLock);
114 cache->cleanerRuns++;
115
116 ChannelCache::entries_t::iterator cur=cache->entries.begin(), next, end=cache->entries.end();
117 while(cur!=end) {
118 next = cur;
119 ++next;
120
121 if(!cur->second->dropPoke && cur->second->interested.empty()) {
122 cleaned.insert(cur->second);
123 cache->entries.erase(cur);
124 cache->cleanerDust++;
125 } else {
126 cur->second->dropPoke = false;
127 }
128
129 cur = next;
130 }
131 }
132 return epicsTimerNotify::expireStatus(epicsTimerNotify::restart, 30.0);
133 }

Member Data Documentation

◆ cache

ChannelCache* ChannelCache::cacheClean::cache

Definition at line 104 of file chancache.cpp.


The documentation for this struct was generated from the following file: