MCPcopy Create free account
hub / github.com/apache/thrift / remove

Method remove

lib/cpp/src/thrift/concurrency/TimerManager.cpp:276–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274}
275
276void TimerManager::remove(shared_ptr<Runnable> task) {
277 Synchronized s(monitor_);
278 if (state_ != TimerManager::STARTED) {
279 throw IllegalStateException();
280 }
281 bool found = false;
282 for (auto ix = taskMap_.begin(); ix != taskMap_.end();) {
283 if (*ix->second == task) {
284 found = true;
285 taskCount_--;
286 taskMap_.erase(ix++);
287 } else {
288 ++ix;
289 }
290 }
291 if (!found) {
292 throw NoSuchTaskException();
293 }
294}
295
296void TimerManager::remove(Timer handle) {
297 Synchronized s(monitor_);

Callers 15

deleteCounterMethod · 0.45
test01Method · 0.45
test02Method · 0.45
test03Method · 0.45
test04Method · 0.45
mainMethod · 0.45
runMethod · 0.45
transitionMethodsMethod · 0.45
timeoutMethodsMethod · 0.45
selectMethod · 0.45
acceptNewConnectionMethod · 0.45

Calls 6

NoSuchTaskExceptionClass · 0.85
beginMethod · 0.45
endMethod · 0.45
lockMethod · 0.45

Tested by 7

test01Method · 0.36
test02Method · 0.36
test03Method · 0.36
test04Method · 0.36
mainMethod · 0.36