Text archives Help
- From: arobison@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [Manta] r1880 - trunk/Engine/Control
- Date: Wed, 28 Nov 2007 12:28:53 -0700 (MST)
Author: arobison
Date: Wed Nov 28 12:28:52 2007
New Revision: 1880
Modified:
trunk/Engine/Control/RTRT.cc
Log:
Fixed a potential deadlock.
Modified: trunk/Engine/Control/RTRT.cc
==============================================================================
--- trunk/Engine/Control/RTRT.cc (original)
+++ trunk/Engine/Control/RTRT.cc Wed Nov 28 12:28:52 2007
@@ -412,18 +412,18 @@
void RTRT::beginRendering(bool blockUntilFinished) throw (Exception &)
{
runningLock.lock();
- if(running)
+ if(running) {
+ runningLock.unlock();
throw InvalidState("renderLoop started while it is already running");
+ }
running=true;
runningLock.unlock();
if(workersWanted <= 0){
- runningLock.unlock();
throw IllegalValue<int>("workersWanted should be positive",
workersWanted);
}
if(workersRendering != 0){
- runningLock.unlock();
throw IllegalValue<int>("workersRendering should be zero",
workersRendering);
}
- [Manta] r1880 - trunk/Engine/Control, arobison, 11/28/2007
Archive powered by MHonArc 2.6.16.