#ifndef THREAD_UTILS_H_INCLUDED #define THREAD_UTILS_H_INCLUDED #include "boost/signal.hpp" #include "boost/thread.hpp" namespace SE { struct TFuncToPerform { private: public: TFuncToPerform() : LockerPtr(new boost::mutex) { } bool Executed; std::shared_ptr LockerPtr; boost::function Func; }; void AssertIfInMainThread(); void PerformInMainThreadAsync(boost::function f); template RETURNTYPE PerformInMainThread(boost::function f); } //namespace SE #endif