Changeset 3304 for code/trunk/src/core/TclThreadManager.h
- Timestamp:
- Jul 18, 2009, 6:23:31 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/netp6 (added) merged: 3215,3226-3227,3229-3231,3240,3242,3251-3252,3256,3258-3259,3263-3264,3267-3268,3277,3283-3284,3289,3298-3299,3302
- Property svn:mergeinfo changed
-
code/trunk/src/core/TclThreadManager.h
r3196 r3304 32 32 #include "CorePrereqs.h" 33 33 34 #include <cassert> 34 35 #include <list> 35 36 #include <map> 36 37 #include <string> 37 #include <boost/thread/condition.hpp>38 #include <boost/thread/mutex.hpp>39 #include <boost/thread/thread.hpp>40 41 38 #include "core/OrxonoxClass.h" 42 39 43 40 namespace orxonox 44 41 { 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 }; 42 // Internal struct 43 struct TclInterpreterBundle; 66 44 67 45 class _CoreExport TclThreadManager : public OrxonoxClass … … 101 79 102 80 Tcl::interpreter* createNewTclInterpreter(const std::string& threadID); 81 Tcl::interpreter* getTclInterpreter(unsigned int threadID); 103 82 TclInterpreterBundle* getInterpreterBundle(unsigned int threadID); 104 83 std::string dumpList(const std::list<unsigned int>& list); … … 119 98 120 99 unsigned int threadCounter_; 121 TclInterpreterBundle orxonoxInterpreterBundle_;100 TclInterpreterBundle* orxonoxInterpreterBundle_; 122 101 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 102 132 103 static TclThreadManager* singletonRef_s;
Note: See TracChangeset
for help on using the changeset viewer.