-/* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2023. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <functional>
#include <list>
#include <map>
+#include <set>
+#include <unordered_set>
#include <memory>
namespace simgrid::kernel::actor {
aid_t get_ppid() const { return ppid_; }
static unsigned long get_maxpid() { return maxpid_; }
- // In MC mode, the application sends this pointer to the MC
- static unsigned long* get_maxpid_addr() { return &maxpid_; }
};
/*------------------------- [ ActorRestartingTrait ] -------------------------*/
friend activity::MailboxImpl;
public:
- ActorImpl(std::string name, s4u::Host* host, aid_t ppid);
+ ActorImpl(const std::string& name, s4u::Host* host, aid_t ppid);
ActorImpl(const ActorImpl&) = delete;
ActorImpl& operator=(const ActorImpl&) = delete;
~ActorImpl();
bool suspended_ = false;
activity::ActivityImplPtr waiting_synchro_ = nullptr; /* the current blocking synchro if any */
- std::list<activity::ActivityImplPtr> activities_; /* the current non-blocking synchros */
+ std::set<activity::ActivityImplPtr> activities_; /* the current non-blocking synchros */
Simcall simcall_;
/* list of functions executed when the actor dies */
std::shared_ptr<std::vector<std::function<void(bool)>>> on_exit =