8#include <boost/noncopyable.hpp>
9#include <boost/thread.hpp>
13#include <unordered_set>
15namespace ChimeraTK::detail {
18 struct CircularDependencyDetector : boost::noncopyable {
19 CircularDependencyDetector() =
default;
20 ~CircularDependencyDetector();
24 void registerDependencyWait(VariableNetworkNode& node);
28 void unregisterDependencyWait(VariableNetworkNode& node);
33 void printWaiters(std::ostream& stream = std::cout);
39 void startDetectBlockedModules();
42 void detectBlockedModules();
46 std::map<Module*, Module*> _waitMap;
47 std::map<Module*, std::string> _awaitedVariables;
48 std::map<EntityOwner*, VariableNetworkNode> _awaitedNodes;
49 std::unordered_set<Module*> _modulesWeHaveWarnedAbout;
50 std::unordered_set<std::string> _devicesWeHaveWarnedAbout;
51 std::unordered_set<NodeType> _otherThingsWeHaveWarnedAbout;
52 boost::thread _thread;