Commit a65ae292 authored by Dominik Charousset's avatar Dominik Charousset

Fix CI findings on Linux and Windows

parent 863b23dc
...@@ -213,7 +213,20 @@ deterministic::deterministic() : cfg(this), sys(cfg) { ...@@ -213,7 +213,20 @@ deterministic::deterministic() : cfg(this), sys(cfg) {
} }
deterministic::~deterministic() { deterministic::~deterministic() {
events_.clear(); // Note: we need clean up all remaining messages manually. This in turn may
// clean up actors as unreachable if the test did not consume all
// messages. Otherwise, the destructor of `sys` will wait for all
// actors, potentially waiting forever. However, we cannot just call
// `events_.clear()`, because that would potentially cause an actor to
// become unreachable and close its mailbox. This would call
// `pop_msg_impl` in turn, which then tries to alter the list while
// we're clearing it.
while (!events_.empty()) {
std::list<std::unique_ptr<scheduling_event>> tmp;
tmp.splice(tmp.end(), events_);
// Here, tmp will be destroyed and cleanup code of actors might send more
// messages. Hence the loop.
}
} }
bool deterministic::prepone_event_impl(const strong_actor_ptr& receiver) { bool deterministic::prepone_event_impl(const strong_actor_ptr& receiver) {
......
...@@ -145,7 +145,7 @@ private: ...@@ -145,7 +145,7 @@ private:
private: private:
template <size_t... Is> template <size_t... Is>
bool do_check(const_typed_message_view<Ts...> view, // bool do_check([[maybe_unused]] const_typed_message_view<Ts...> view, //
std::index_sequence<Is...>) { std::index_sequence<Is...>) {
return (((std::get<Is>(*predicates_))(get<Is>(view))) && ...); return (((std::get<Is>(*predicates_))(get<Is>(view))) && ...);
} }
......
...@@ -13,12 +13,6 @@ ...@@ -13,12 +13,6 @@
namespace fixture = caf::test::fixture; namespace fixture = caf::test::fixture;
template <class T>
using value_predicate = fixture::deterministic::value_predicate<T>;
template <class... Ts>
using message_predicate = fixture::deterministic::message_predicate<Ts...>;
struct my_int { struct my_int {
int value; int value;
}; };
......
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