MCPcopy Create free account
hub / github.com/ElementsProject/elements / TryForEachAndRemoveFailed

Function TryForEachAndRemoveFailed

src/zmq/zmqnotificationinterface.cpp:117–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115
116template <typename Function>
117void TryForEachAndRemoveFailed(std::list<std::unique_ptr<CZMQAbstractNotifier>>& notifiers, const Function& func)
118{
119 for (auto i = notifiers.begin(); i != notifiers.end(); ) {
120 CZMQAbstractNotifier* notifier = i->get();
121 if (func(notifier)) {
122 ++i;
123 } else {
124 notifier->Shutdown();
125 i = notifiers.erase(i);
126 }
127 }
128}
129
130} // anonymous namespace
131

Callers 5

UpdatedBlockTipMethod · 0.85
BlockConnectedMethod · 0.85
BlockDisconnectedMethod · 0.85

Calls 5

beginMethod · 0.45
endMethod · 0.45
getMethod · 0.45
ShutdownMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected