Changeset 3264 for code/branches/netp6/src/core/TclThreadManager.h
- Timestamp:
- Jul 1, 2009, 11:22:03 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp6/src/core/TclThreadManager.h
r3196 r3264 35 35 #include <map> 36 36 #include <string> 37 #include <boost/thread/condition.hpp>38 #include <boost/thread/mutex.hpp>39 #include <boost/thread/thread.hpp>40 41 37 #include "core/OrxonoxClass.h" 42 38 43 39 namespace orxonox 44 40 { 45 struct _CoreExport TclInterpreterBundle 46 { 47 unsigned int id_; 48 49 std::list<std::string> queue_; 50 boost::mutex queueMutex_; 51 52 Tcl::interpreter* interpreter_; 53 std::string interpreterName_; 54 boost::try_mutex interpreterMutex_; 55 56 std::list<unsigned int> queriers_; 57 boost::mutex queriersMutex_; 58 59 bool running_; 60 boost::mutex runningMutex_; 61 62 bool finished_; 63 boost::mutex finishedMutex_; 64 boost::condition finishedCondition_; 65 }; 41 // Internal struct 42 struct TclInterpreterBundle; 66 43 67 44 class _CoreExport TclThreadManager : public OrxonoxClass … … 101 78 102 79 Tcl::interpreter* createNewTclInterpreter(const std::string& threadID); 80 Tcl::interpreter* getTclInterpreter(unsigned int threadID); 103 81 TclInterpreterBundle* getInterpreterBundle(unsigned int threadID); 104 82 std::string dumpList(const std::list<unsigned int>& list); … … 119 97 120 98 unsigned int threadCounter_; 121 TclInterpreterBundle orxonoxInterpreterBundle_;99 TclInterpreterBundle* orxonoxInterpreterBundle_; 122 100 std::map<unsigned int, TclInterpreterBundle*> interpreterBundles_; 123 boost::mutex bundlesMutex_;124 boost::condition fullQueueCondition_;125 boost::condition orxonoxEvalCondition_;126 #if (BOOST_VERSION >= 103500)127 boost::thread::id threadID_;128 #else129 boost::thread threadID_;130 #endif131 101 132 102 static TclThreadManager* singletonRef_s;
Note: See TracChangeset
for help on using the changeset viewer.