Commit 2da99380 authored by Jakob Otto's avatar Jakob Otto

Fix thread-safe multitimeout

parent f2db0225
......@@ -39,6 +39,9 @@ public:
void set_request_timeout(time_point t, abstract_actor* self,
message_id id) override;
void set_multi_timeout(time_point t, abstract_actor* self,
atom_value type, uint64_t id) override;
void cancel_ordinary_timeout(abstract_actor* self, atom_value type) override;
void cancel_request_timeout(abstract_actor* self, message_id id) override;
......
......@@ -52,6 +52,15 @@ void thread_safe_actor_clock::set_request_timeout(time_point t,
}
}
void thread_safe_actor_clock::set_multi_timeout(time_point t, abstract_actor* self,
atom_value type, uint64_t id) {
guard_type guard{mx_};
if (!done_) {
super::set_multi_timeout(t, self, type, id);
cv_.notify_all();
}
}
void thread_safe_actor_clock::cancel_ordinary_timeout(abstract_actor* self,
atom_value type) {
guard_type guard{mx_};
......
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