Changeset 1434 for code/branches/console/src/core/TclThreadManager.cc
- Timestamp:
- May 27, 2008, 12:27:13 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/core/TclThreadManager.cc
r1424 r1434 48 48 namespace orxonox 49 49 { 50 SetConsoleCommandShortcutGeneric(tclexecute, createConsoleCommand(createFunctor(&TclThreadManager::execute), "tclexecute")) ;51 SetConsoleCommandShortcutGeneric(tclquery, createConsoleCommand(createFunctor(&TclThreadManager::query), "tclquery" )) ;50 SetConsoleCommandShortcutGeneric(tclexecute, createConsoleCommand(createFunctor(&TclThreadManager::execute), "tclexecute")).setArgumentCompleter(0, autocompletion::tclthreads()); 51 SetConsoleCommandShortcutGeneric(tclquery, createConsoleCommand(createFunctor(&TclThreadManager::query), "tclquery" )).setArgumentCompleter(0, autocompletion::tclthreads()); 52 52 SetConsoleCommand(TclThreadManager, create, false); 53 SetConsoleCommand(TclThreadManager, destroy, false) ;54 SetConsoleCommand(TclThreadManager, execute, false) ;55 SetConsoleCommand(TclThreadManager, query, false) ;53 SetConsoleCommand(TclThreadManager, destroy, false).setArgumentCompleter(0, autocompletion::tclthreads()); 54 SetConsoleCommand(TclThreadManager, execute, false).setArgumentCompleter(0, autocompletion::tclthreads()); 55 SetConsoleCommand(TclThreadManager, query, false).setArgumentCompleter(0, autocompletion::tclthreads()); 56 56 SetConsoleCommand(TclThreadManager, status, false); 57 SetConsoleCommand(TclThreadManager, dump, false) ;58 SetConsoleCommand(TclThreadManager, flush, false) ;57 SetConsoleCommand(TclThreadManager, dump, false).setArgumentCompleter(0, autocompletion::tclthreads()); 58 SetConsoleCommand(TclThreadManager, flush, false).setArgumentCompleter(0, autocompletion::tclthreads()); 59 59 60 60 TclThreadManager* instance_tclthreadmanager = &TclThreadManager::getInstance(); … … 632 632 } 633 633 634 std::list<std::pair<std::string, std::string> > TclThreadManager::getThreadList() const 635 { 636 boost::mutex::scoped_lock bundles_lock(TclThreadManager::getInstance().bundlesMutex_); 637 std::list<std::pair<std::string, std::string> > threads; 638 for (std::map<unsigned int, TclInterpreterBundle*>::const_iterator it = this->interpreterBundles_.begin(); it != this->interpreterBundles_.end(); ++it) 639 { 640 std::string number = getConvertedValue<unsigned int, std::string>((*it).first); 641 threads.push_back(std::pair<std::string, std::string>(number, number)); 642 } 643 return threads; 644 } 645 634 646 void tclThread(TclInterpreterBundle* interpreterBundle, std::string command) 635 647 {
Note: See TracChangeset
for help on using the changeset viewer.