Changeset 1247 for code/branches/console/src
- Timestamp:
- May 8, 2008, 1:46:05 AM (17 years ago)
- Location:
- code/branches/console/src/core
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/core/Executor.h
r1062 r1247 35 35 #include "util/SubString.h" 36 36 #include "util/String.h" 37 #include "util/Math.h" 37 38 #include "Functor.h" 38 39 #include "Debug.h" … … 100 101 COUT(5) << tokens[i]; \ 101 102 } \ 102 COUT(5) << ") and " << (paramCount - tokens.size()) << " default values ("; \103 COUT(5) << ") and " << max((int)paramCount - (int)tokens.size(), 0) << " default values ("; \ 103 104 for (unsigned int i = tokens.size(); i < paramCount; i++) \ 104 105 { \ -
code/branches/console/src/core/TclBind.cc
r1230 r1247 137 137 catch (std::exception const &e) 138 138 { 139 COUT(1) << "Error while executing tcl: " << e.what() << std::endl;139 COUT(1) << "Error while executing Tcl: " << e.what() << std::endl; 140 140 } 141 141 … … 156 156 catch (std::exception const &e) 157 157 { 158 COUT(1) << "Error while executing tcl: " << e.what() << std::endl;158 COUT(1) << "Error while executing Tcl: " << e.what() << std::endl; 159 159 } 160 160 -
code/branches/console/src/core/TclThreadManager.cc
r1230 r1247 53 53 ConsoleCommand(TclThreadManager, execute, AccessLevel::None, false); 54 54 ConsoleCommand(TclThreadManager, query, AccessLevel::None, false); 55 ConsoleCommand(TclThreadManager, status, AccessLevel::None, false); 56 ConsoleCommand(TclThreadManager, dump, AccessLevel::None, false); 55 57 56 58 TclThreadManager* instance = &TclThreadManager::getInstance(); … … 62 64 this->IDcount_ = 0; 63 65 this->isReady_ = false; 66 this->isQuerying_ = false; 67 this->queryID_ = 0; 64 68 } 65 69 … … 103 107 } 104 108 109 void TclThreadManager::status() 110 { 111 COUT(0) << "Thread ID" << '\t' << "Queue size" << '\t' << "State" << std::endl; 112 113 std::string output = "Orxonox"; 114 output += "\t\t"; 115 { 116 // mutex orxqueue 117 boost::mutex::scoped_lock lock(TclThreadManager::getInstance().orxonoxQueueMutex_); 118 output += getConvertedValue<unsigned int, std::string>(TclThreadManager::getInstance().orxonoxQueue_.size()); 119 } 120 output += "\t\t"; 121 { 122 // mutex orxstate 123 boost::mutex::scoped_lock lock(TclThreadManager::getInstance().orxonoxStateMutex_); 124 if (TclThreadManager::getInstance().isReady_) 125 output += "ready"; 126 else 127 output += "busy"; 128 } 129 COUT(0) << output << std::endl; 130 131 // mutex threads 132 boost::mutex::scoped_lock lock(TclThreadManager::getInstance().threadsMutex_); 133 for (std::map<unsigned int, TclThread*>::const_iterator it = TclThreadManager::getInstance().threads_.begin(); it != TclThreadManager::getInstance().threads_.end(); ++it) 134 { 135 std::string output = getConvertedValue<unsigned int, std::string>((*it).first); 136 output += "\t\t"; 137 { 138 boost::mutex::scoped_lock lock(TclThreadManager::getInstance().threadQueuesMutex_); 139 std::map<unsigned int, std::pair<std::queue<std::string>, boost::condition*> >::const_iterator it2 = TclThreadManager::getInstance().threadQueues_.find((*it).first); 140 if (it2 != TclThreadManager::getInstance().threadQueues_.end()) 141 output += getConvertedValue<unsigned int, std::string>((*it2).second.first.size()); 142 else 143 output += "-"; 144 } 145 output += "\t\t"; 146 if (TclThreadManager::getInstance().getState((*it).second) == TclThread::Ready) 147 output += "ready"; 148 else 149 output += "busy"; 150 151 COUT(0) << output << std::endl; 152 } 153 } 154 155 void TclThreadManager::dump(unsigned int threadID) 156 { 157 if (threadID == 0) 158 { 159 // mutex orxqueue 160 boost::mutex::scoped_lock lock(TclThreadManager::getInstance().orxonoxQueueMutex_); 161 162 COUT(0) << "Queue dump of Orxonox:" << std::endl; 163 for (unsigned int index = 0; index < TclThreadManager::getInstance().orxonoxQueue_.size(); index++) 164 { 165 std::string command = TclThreadManager::getInstance().orxonoxQueue_.front(); 166 COUT(0) << index << ": " << command << std::endl; 167 TclThreadManager::getInstance().orxonoxQueue_.pop(); 168 TclThreadManager::getInstance().orxonoxQueue_.push(command); 169 } 170 } 171 else 172 { 173 // mutex threadqueues 174 boost::mutex::scoped_lock lock(TclThreadManager::getInstance().threadQueuesMutex_); 175 176 std::map<unsigned int, std::pair<std::queue<std::string>, boost::condition*> >::iterator it = TclThreadManager::getInstance().threadQueues_.find(threadID); 177 if (it != TclThreadManager::getInstance().threadQueues_.end()) 178 { 179 COUT(0) << "Queue dump of Tcl-thread " << threadID << ":" << std::endl; 180 for (unsigned int index = 0; index < (*it).second.first.size(); index++) 181 { 182 std::string command = (*it).second.first.front(); 183 COUT(0) << index << ": " << command << std::endl; 184 (*it).second.first.pop(); 185 (*it).second.first.push(command); 186 } 187 } 188 else 189 { 190 COUT(1) << "Error: (" << __LINE__ << ") No Tcl-thread with ID " << threadID << "." << std::endl; 191 } 192 } 193 } 194 105 195 void TclThreadManager::tcl_execute(Tcl::object const &args) 106 196 { 107 std::cout << "3_1\n";108 197 std::cout << "Tcl-thread_execute: args: " << args.get() << std::endl; 109 198 std::string command = args.get(); … … 115 204 } 116 205 117 std::string TclThreadManager::tcl_orxonox(Tcl::object const &args) 118 { 119 std::cout << "4_1\n"; 120 std::cout << "Tcl-thread_orxonox: args: " << args.get() << std::endl; 206 std::string TclThreadManager::tcl_query(int id, Tcl::object const &args) 207 { 208 std::cout << "Tcl-thread_query: id: " << id << " args: " << args.get() << std::endl; 209 { 210 // mutex query 211 boost::mutex::scoped_lock lock(TclThreadManager::getInstance().orxonoxQueryMutex_); 212 if (TclThreadManager::getInstance().isQuerying_ && (id == (int)TclThreadManager::getInstance().queryID_)) 213 { 214 COUT(1) << "Error: Orxonox Tcl-interpreter can't be queried right now." << std::endl; 215 return ""; 216 } 217 } 218 121 219 std::string command = args.get(); 122 220 123 if(command.size() >= 2 && command[0] == '{' && command[command.size() - 1] == '}')221 while (command.size() >= 2 && command[0] == '{' && command[command.size() - 1] == '}') 124 222 command = command.substr(1, command.size() - 2); 125 223 … … 129 227 Tcl::interpreter* TclThreadManager::createTclInterpreter(unsigned int threadID) const 130 228 { 131 Tcl::interpreter* i = new Tcl::interpreter(TclBind::getInstance().getTclLibPath()); 132 133 i->def("orxonox", TclThreadManager::tcl_orxonox, Tcl::variadic()); 229 Tcl::interpreter* i = 0; 230 i = new Tcl::interpreter(TclBind::getInstance().getTclLibPath()); 231 232 i->def("query", TclThreadManager::tcl_query, Tcl::variadic()); 134 233 i->def("execute", TclThreadManager::tcl_execute, Tcl::variadic()); 135 234 136 235 std::string id = getConvertedValue<unsigned int, std::string>(threadID); 137 i->eval("rename exit tclexit; proc exit {} { orxonox TclThreadManager destroy " + id + " }"); 138 i->eval("set threadid " + id); 139 i->eval("redef_puts"); 236 try 237 { 238 i->eval("rename exit tclexit; proc exit {} { orxonox TclThreadManager destroy " + id + " }"); 239 i->eval("proc orxonox args { query " + id + " $args }"); 240 i->eval("set threadid " + id); 241 i->eval("redef_puts"); 242 } 243 catch (Tcl::tcl_error const &e) 244 { 245 COUT(1) << "Tcl error: " << e.what() << std::endl; 246 } 247 catch (std::exception const &e) 248 { 249 COUT(1) << "Error while creating Tcl-thread (" << id << "): " << e.what() << std::endl; 250 } 140 251 141 252 return i; … … 145 256 { 146 257 this->IDcount_++; 147 Tcl::interpreter* i = this->createTclInterpreter(this->IDcount_); 148 boost::try_mutex* m = new boost::try_mutex; 149 boost::thread* t = new boost::thread(boost::bind(&tclThreadLoop, i, m, this->IDcount_)); 150 TclThread newthread = {i, t, m}; 258 TclThread* newthread = new TclThread; 259 newthread->threadID_ = this->IDcount_; 260 newthread->interpreter_ = this->createTclInterpreter(this->IDcount_); 261 newthread->evalMutex_ = new boost::mutex; 262 newthread->stateMutex_ = new boost::mutex; 263 newthread->state_ = new TclThread::State(TclThread::Ready); 264 newthread->thread_ = new boost::thread(boost::bind(&tclThreadLoop, newthread)); 151 265 { 152 266 // mutex threads … … 157 271 // mutes threadqueues 158 272 boost::mutex::scoped_lock lock(this->threadQueuesMutex_); 159 this->threadQueues_[this->IDcount_] ;273 this->threadQueues_[this->IDcount_] = std::pair<std::queue<std::string>, boost::condition*>(std::queue<std::string>(), new boost::condition()); 160 274 } 161 275 return true; … … 167 281 boost::mutex::scoped_lock lock(this->threadsMutex_); 168 282 169 std::map<unsigned int, TclThread >::iterator it = this->threads_.find(threadID);283 std::map<unsigned int, TclThread*>::iterator it = this->threads_.find(threadID); 170 284 if (it != this->threads_.end()) 171 285 { 172 delete (*it).second.interpreter_; 173 delete (*it).second.thread_; 174 delete (*it).second.mutex_; 286 this->setState((*it).second, TclThread::Finished); 287 (*it).second->thread_->timed_join(boost::posix_time::time_duration(0, 0, 0, 10)); 288 289 delete (*it).second->interpreter_; 290 delete (*it).second->thread_; 291 delete (*it).second->evalMutex_; 292 delete (*it).second->stateMutex_; 293 delete (*it).second->state_; 294 delete (*it).second; 175 295 176 296 this->threads_.erase(it); … … 178 298 // mutex threadqueues 179 299 boost::mutex::scoped_lock lock(this->threadQueuesMutex_); 180 this->threadQueues_.erase(threadID); 300 std::map<unsigned int, std::pair<std::queue<std::string>, boost::condition*> >::iterator it = this->threadQueues_.find(threadID); 301 if (it != this->threadQueues_.end()) 302 { 303 delete (*it).second.second; 304 this->threadQueues_.erase(threadID); 305 } 306 else 307 { 308 return false; 309 } 181 310 } 182 311 return true; … … 184 313 else 185 314 { 186 COUT(1) << "Error: No Tcl-thread with ID " << threadID << "." << std::endl;315 COUT(1) << "Error: (" << __LINE__ << ") No Tcl-thread with ID " << threadID << "." << std::endl; 187 316 return false; 188 317 } 318 } 319 320 void TclThreadManager::setState(TclThread* tclThread, TclThread::State state) 321 { 322 // mutex state 323 boost::mutex::scoped_lock lock(*tclThread->stateMutex_); 324 *tclThread->state_ = state; 325 } 326 327 TclThread::State TclThreadManager::getState(TclThread* tclThread) 328 { 329 // mutex state 330 boost::mutex::scoped_lock lock(*tclThread->stateMutex_); 331 TclThread::State state = *tclThread->state_; 332 return state; 189 333 } 190 334 … … 194 338 boost::mutex::scoped_lock lock(this->orxonoxQueueMutex_); 195 339 196 while (this->orxonoxQueue_.size() == TCLTHREAD_MAX_QUEUE_LENGTH)340 while (this->orxonoxQueue_.size() >= TCLTHREAD_MAX_QUEUE_LENGTH) 197 341 this->orxonoxQueueCondition_.wait(lock); 198 342 … … 226 370 boost::mutex::scoped_lock lock(this->threadQueuesMutex_); 227 371 228 std::map<unsigned int, std:: queue<std::string> >::iterator it = this->threadQueues_.find(threadID);372 std::map<unsigned int, std::pair<std::queue<std::string>, boost::condition*> >::iterator it = this->threadQueues_.find(threadID); 229 373 if (it != this->threadQueues_.end()) 230 374 { 231 (*it).second.push(command); 375 while ((*it).second.first.size() >= TCLTHREAD_MAX_QUEUE_LENGTH) 376 (*it).second.second->wait(lock); 377 378 (*it).second.first.push(command); 232 379 } 233 380 else 234 381 { 235 COUT(1) << "Error: No Tcl-thread with ID " << threadID << "." << std::endl;382 COUT(1) << "Error: (" << __LINE__ << ") No Tcl-thread with ID " << threadID << "." << std::endl; 236 383 } 237 384 } … … 242 389 boost::mutex::scoped_lock lock(this->threadQueuesMutex_); 243 390 244 std::map<unsigned int, std:: queue<std::string> >::iterator it = this->threadQueues_.find(threadID);391 std::map<unsigned int, std::pair<std::queue<std::string>, boost::condition*> >::iterator it = this->threadQueues_.find(threadID); 245 392 if (it != this->threadQueues_.end()) 246 393 { 247 std::string command = (*it).second.f ront();248 (*it).second. pop();394 std::string command = (*it).second.first.front(); 395 (*it).second.first.pop(); 249 396 return command; 250 397 } 251 398 else 252 399 { 253 COUT(1) << "Error: No Tcl-thread with ID " << threadID << "." << std::endl;400 COUT(1) << "Error: (" << __LINE__ << ") No Tcl-thread with ID " << threadID << "." << std::endl; 254 401 return ""; 255 402 } … … 261 408 boost::mutex::scoped_lock lock(this->threadQueuesMutex_); 262 409 263 std::map<unsigned int, std:: queue<std::string> >::iterator it = this->threadQueues_.find(threadID);410 std::map<unsigned int, std::pair<std::queue<std::string>, boost::condition*> >::const_iterator it = this->threadQueues_.find(threadID); 264 411 if (it != this->threadQueues_.end()) 265 412 { 266 return (*it).second. empty();413 return (*it).second.first.empty(); 267 414 } 268 415 else 269 416 { 270 COUT(1) << "Error: No Tcl-thread with ID " << threadID << "." << std::endl;417 COUT(1) << "Error: (" << __LINE__ << ") No Tcl-thread with ID " << threadID << "." << std::endl; 271 418 return true; 272 419 } … … 275 422 std::string TclThreadManager::eval(const std::string& command) 276 423 { 277 boost::mutex::scoped_lock lock(this->orxonoxEvalMutex_); 424 // mutex orxstate 425 boost::mutex::scoped_lock lock(this->orxonoxStateMutex_); 278 426 279 427 while (!this->isReady_) … … 290 438 std::string TclThreadManager::eval(unsigned int threadID, const std::string& command) 291 439 { 292 // mutex threads 293 boost::mutex::scoped_lock lock(this->threadsMutex_); 294 295 std::map<unsigned int, TclThread>::iterator it = this->threads_.find(threadID); 296 if (it != this->threads_.end()) 297 { 298 boost::try_mutex::scoped_try_lock lock(*(*it).second.mutex_, boost::defer_lock_t()); 299 bool threadIsReady = false; 300 try 301 { 302 threadIsReady = lock.try_lock(); 303 } 304 catch(boost::lock_error& e){ std::cout << "lockerror thread" << std::endl; } 305 306 if (threadIsReady) 307 { 308 try 309 { 440 { 441 // mutex query 442 boost::mutex::scoped_lock lock(this->orxonoxQueryMutex_); 443 this->isQuerying_ = true; 444 this->queryID_ = threadID; 445 std::cout << "2_0\n"; 446 } 447 448 { 449 // mutex threads 450 boost::mutex::scoped_lock lock(this->threadsMutex_); 451 452 std::map<unsigned int, TclThread*>::iterator it = this->threads_.find(threadID); 453 if (it != this->threads_.end()) 454 { 310 455 std::cout << "2_1\n"; 311 return (*it).second.interpreter_->eval(command); 312 } 313 catch (Tcl::tcl_error const &e) 456 if (this->getState((*it).second) == TclThread::Ready) 314 457 { 315 458 std::cout << "2_2\n"; 316 COUT(1) << "Tcl error: " << e.what() << std::endl;317 }318 catch (std::exception const &e)319 {459 // mutex threadeval 460 boost::mutex::scoped_lock lock(*(*it).second->evalMutex_); 461 try 462 { 320 463 std::cout << "2_3\n"; 321 COUT(1) << "Error while executing tcl: " << e.what() << std::endl; 464 return (*it).second->interpreter_->eval(command); 465 } 466 catch (Tcl::tcl_error const &e) 467 { 468 COUT(1) << "Tcl error: " << e.what() << std::endl; 469 } 470 catch (std::exception const &e) 471 { 472 COUT(1) << "Error while executing Tcl: " << e.what() << std::endl; 473 } 474 std::cout << "2_4\n"; 475 } 476 else 477 { 478 COUT(1) << "Error: Tcl-thread with ID " << threadID << " is not ready. Wait until it's finished or start a new thread." << std::endl; 322 479 } 323 480 } 324 481 else 325 482 { 326 COUT(1) << "Error: Tcl-thread with ID " << threadID << " is not ready. Wait until it's finished or start a new thread." << std::endl; 327 } 328 } 329 else 330 { 331 COUT(1) << "Error: No Tcl-thread with ID " << threadID << "." << std::endl; 332 } 483 COUT(1) << "Error: (" << __LINE__ << ") No Tcl-thread with ID " << threadID << "." << std::endl; 484 } 485 } 486 487 { 488 // mutex query 489 boost::mutex::scoped_lock lock(this->orxonoxQueryMutex_); 490 this->isQuerying_ = false; 491 this->queryID_ = 0; 492 std::cout << "2_5\n"; 493 } 494 333 495 return ""; 334 496 } … … 337 499 { 338 500 { 339 boost::mutex::scoped_lock lock(this->orxonoxEvalMutex_); 501 // mutex orxstate 502 boost::mutex::scoped_lock lock(this->orxonoxStateMutex_); 340 503 this->isReady_ = true; 341 504 } … … 345 508 346 509 { 347 boost::mutex::scoped_lock lock(this->orxonoxEvalMutex_); 510 // mutex orxstate 511 boost::mutex::scoped_lock lock(this->orxonoxStateMutex_); 348 512 this->isReady_ = false; 349 513 } … … 359 523 } 360 524 361 void tclThreadLoop(Tcl ::interpreter* interpreter, boost::try_mutex* mutex, unsigned int threadID)525 void tclThreadLoop(TclThread* tclThread) 362 526 { 363 527 while (true) 364 528 { 365 { 366 boost::try_mutex::scoped_try_lock lock(*mutex, boost::defer_lock_t()); 367 bool threadIsReady = false; 529 if (!TclThreadManager::getInstance().isEmpty(tclThread->threadID_)) 530 { 531 std::cout << "a\n"; 532 TclThreadManager::getInstance().setState(tclThread, TclThread::Busy); 533 // if (!TclThreadManager::getInstance().isEmpty(tclThread->threadID_)) 534 { 535 try 536 { 537 std::cout << "c\n"; 538 throw std::exception(); 539 std::cout << "d\n"; 540 } 541 catch (...) 542 { 543 std::cout << "e\n"; 544 } 545 } 546 TclThreadManager::getInstance().setState(tclThread, TclThread::Ready); 547 std::cout << "f\n"; 548 549 // boost::this_thread::yield(); 550 // if (TclThreadManager::getInstance().getState(tclThread) == TclThread::Finished) 551 // return; 552 } 553 } 554 555 /* while (true) 556 { 557 TclThreadManager::getInstance().setState(tclThread, TclThread::Busy); 558 while (!TclThreadManager::getInstance().isEmpty(tclThread->threadID_)) 559 { 368 560 try 369 561 { 370 threadIsReady = lock.try_lock(); 371 } 372 catch(boost::lock_error& e){ std::cout << "lockerror thread" << std::endl; } 373 374 if (threadIsReady) 375 { 376 while (!TclThreadManager::getInstance().isEmpty(threadID)) 377 { 378 try 379 { 380 std::cout << "1\n"; 381 std::cout << threadID << std::endl; 382 std::string temp = TclThreadManager::getInstance().popCommandFront(threadID); 383 std::cout << temp << std::endl; 384 interpreter->eval(temp); 385 std::cout << "2\n"; 386 } 387 catch (Tcl::tcl_error const &e) 388 { 389 std::cout << "3\n"; 390 TclThreadManager::getInstance().pushCommandBack("error Tcl error (thread " + getConvertedValue<unsigned int, std::string>(threadID) + "): " + e.what()); 391 } 392 catch (std::exception const &e) 393 { 394 std::cout << "4\n"; 395 TclThreadManager::getInstance().pushCommandBack("error Error while executing tcl (thread " + getConvertedValue<unsigned int, std::string>(threadID) + "): " + e.what()); 396 } 397 catch (...) 398 { 399 std::cout << "5\n"; 400 TclThreadManager::getInstance().pushCommandBack("error Error while executing tcl (thread " + getConvertedValue<unsigned int, std::string>(threadID) + ")."); 401 } 402 } 403 } 404 } 405 406 while (TclThreadManager::getInstance().isEmpty(threadID)) 562 std::cout << "1_1\n"; 563 // mutex threadeval 564 boost::mutex::scoped_lock lock(*tclThread->evalMutex_); 565 tclThread->interpreter_->eval(TclThreadManager::getInstance().popCommandFront(tclThread->threadID_)); 566 std::cout << "1_2\n"; 567 } 568 catch (Tcl::tcl_error const &e) 569 { 570 TclThreadManager::getInstance().pushCommandBack("error Tcl error (thread " + getConvertedValue<unsigned int, std::string>(tclThread->threadID_) + "): " + e.what()); 571 } 572 catch (std::exception const &e) 573 { 574 TclThreadManager::getInstance().pushCommandBack("error Error while executing Tcl (thread " + getConvertedValue<unsigned int, std::string>(tclThread->threadID_) + "): " + e.what()); 575 } 576 std::cout << "1_4\n"; 577 } 578 TclThreadManager::getInstance().setState(tclThread, TclThread::Ready); 579 580 while (TclThreadManager::getInstance().isEmpty(tclThread->threadID_)) 581 { 407 582 boost::this_thread::yield(); 408 } 583 if (TclThreadManager::getInstance().getState(tclThread) == TclThread::Finished) 584 return; 585 } 586 }*/ 409 587 } 410 588 } -
code/branches/console/src/core/TclThreadManager.h
r1230 r1247 45 45 struct TclThread 46 46 { 47 unsigned int threadID_; 47 48 Tcl::interpreter* interpreter_; 48 49 boost::thread* thread_; 49 boost::try_mutex* mutex_; 50 boost::mutex* evalMutex_; 51 boost::mutex* stateMutex_; 52 enum State 53 { 54 Ready, 55 Busy, 56 Finished, 57 Error 58 }* state_; 50 59 }; 51 60 … … 60 69 static void execute(unsigned int threadID, const std::string& command); 61 70 static std::string query(unsigned int threadID, const std::string& command); 71 static void status(); 72 static void dump(unsigned int threadID); 62 73 74 static std::string tcl_query(int id, Tcl::object const &args); 63 75 static void tcl_execute(Tcl::object const &args); 64 static std::string tcl_orxonox(Tcl::object const &args);65 76 66 77 Tcl::interpreter* createTclInterpreter(unsigned int threadID) const; 67 78 bool createTclThread(); 68 79 bool destroyTclThread(unsigned int threadID); 80 81 void setState(TclThread* tclThread, TclThread::State state); 82 TclThread::State getState(TclThread* tclThread); 69 83 70 84 void pushCommandBack(const std::string& command); … … 85 99 86 100 bool isReady_; 101 bool isQuerying_; 102 unsigned int queryID_; 87 103 88 104 unsigned int IDcount_; 89 std::map<unsigned int, TclThread > threads_;90 std::map<unsigned int, std:: queue<std::string> > threadQueues_;105 std::map<unsigned int, TclThread*> threads_; 106 std::map<unsigned int, std::pair<std::queue<std::string>, boost::condition*> > threadQueues_; 91 107 std::queue<std::string> orxonoxQueue_; 92 108 93 boost::mutex orxonoxQueueMutex_; 94 boost::mutex threadQueuesMutex_; 95 boost::mutex threadsMutex_; 96 boost::mutex orxonoxEvalMutex_; 109 boost::try_mutex orxonoxQueueMutex_; 110 boost::try_mutex threadQueuesMutex_; 111 boost::try_mutex threadsMutex_; 112 boost::try_mutex orxonoxStateMutex_; 113 boost::try_mutex orxonoxQueryMutex_; 97 114 98 115 boost::condition orxonoxQueueCondition_; … … 100 117 }; 101 118 102 _CoreExport void tclThreadLoop(Tcl ::interpreter* interpreter, boost::try_mutex* mutex, unsigned int threadID);119 _CoreExport void tclThreadLoop(TclThread* tclThread); 103 120 } 104 121
Note: See TracChangeset
for help on using the changeset viewer.