Commit 29fa5512 authored by Dominik Charousset's avatar Dominik Charousset

Optimize loop in `timer_actor`

parent bf61af2e
......@@ -122,8 +122,7 @@ public:
auto it = messages.begin();
while (it != messages.end() && (it->first) <= tout) {
deliver(it->second);
messages.erase(it);
it = messages.begin();
it = messages.erase(it);
}
// wait for next message or next timeout
if (it != messages.end()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment