20 #include <boost/noncopyable.hpp>
21 #include <boost/unordered/unordered_map.hpp>
23 #include <tbb/mutex.h>
24 #include <tbb/tbb_thread.h>
25 #include <tbb/compat/condition_variable>
26 #include <tbb/enumerable_thread_specific.h>
81 virtual void runCallback() = 0;
84 typedef boost::unordered_map<std::string, bool>
EnabledMap;
115 virtual bool active()
const;
127 virtual bool enabled(
const std::string&,
bool def)
const;
133 virtual void printInfo(std::ostream&)
const;
152 template <
typename Container>
155 typedef typename Container::iterator iterator;
156 for (iterator i=cont.begin(), end=cont.end(); i != end; ++i)
160 template <
typename Container>
161 void addCallbacks(Container& cont,
const std::string& tag,
bool def=
true)
163 bool runNow = !
enabled(tag, def);
164 typedef typename Container::iterator iterator;
165 for (iterator i=cont.begin(), end=cont.end(); i != end; ++i)
169 template <
typename Container>
188 class ThreadLocalInfo;
190 virtual ThreadLocalInfo& threadLocalInfo();
194 virtual void createCallbackQueue(
bool force=
false);
211 typedef tbb::enumerable_thread_specific<
277 typedef std::vector<DtCriticalSection*>
Stack;