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