Changeset 1792 for code/trunk/src/core/TclThreadManager.cc
- Timestamp:
- Sep 16, 2008, 8:45:13 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/core/TclThreadManager.cc
r1786 r1792 27 27 */ 28 28 29 #include "TclThreadManager.h" 30 29 31 #include <iostream> 30 32 #include <string> 31 32 33 #include <boost/thread/thread.hpp> 33 34 #include <boost/bind.hpp> 34 35 35 #include <OgreTimer.h> 36 36 … … 39 39 #include "CommandExecutor.h" 40 40 #include "TclBind.h" 41 #include "TclThreadManager.h"42 41 #include "util/Debug.h" 43 42 #include "util/Convert.h" … … 59 58 SetConsoleCommand(TclThreadManager, flush, false).argumentCompleter(0, autocompletion::tclthreads()); 60 59 61 TclThreadManager::TclThreadManager() 60 TclThreadManager* TclThreadManager::singletonRef_s = 0; 61 62 TclThreadManager::TclThreadManager(Tcl::interpreter* interpreter) 62 63 { 63 64 RegisterRootObject(TclThreadManager); 65 66 assert(singletonRef_s == 0); 67 singletonRef_s = this; 64 68 65 69 this->threadCounter_ = 0; 66 70 this->orxonoxInterpreterBundle_.id_ = 0; 67 this->orxonoxInterpreterBundle_.interpreter_ = TclBind::getInstance().getTclInterpreter();71 this->orxonoxInterpreterBundle_.interpreter_ = interpreter; 68 72 #if (BOOST_VERSION >= 103500) 69 73 this->threadID_ = boost::this_thread::get_id(); … … 84 88 } 85 89 this->destroy(threadID); 86 } 87 88 TclThreadManager& TclThreadManager::getInstance() 89 { 90 static TclThreadManager instance; 91 return instance; 90 91 singletonRef_s = 0; 92 92 } 93 93
Note: See TracChangeset
for help on using the changeset viewer.