Author: veithm
Date: Tue Dec  3 08:09:07 2013
New Revision: 1547309

URL: http://svn.apache.org/r1547309
Log:
ETCH-275 Fixed SRuntimes Mutex unlock in Code generation

The Static SRuntimes Mutex is not unlocked on every Error-Case and
resolves to deadlocks.

Change-Id: If224cfb273a8627a8e74f1605a863c3b02743d19

Modified:
    
etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm

Modified: 
etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm
URL: 
http://svn.apache.org/viewvc/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm?rev=1547309&r1=1547308&r2=1547309&view=diff
==============================================================================
--- 
etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm
 (original)
+++ 
etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm
 Tue Dec  3 08:09:07 2013
@@ -350,12 +350,14 @@ status_t $vf::InitValueFactory(EtchRunti
   SRuntimesMutex.lock();
   if (SRuntimes.find(runtime->getId()) != SRuntimes.end()) {
     //runtime is already in list
+    SRuntimesMutex.unlock();
     return ETCH_OK;
   }
 
   status = SRuntimes.push_back(runtime->getId());
   runtime->registerListener(&S${i}RuntimeListener);
   if (status != ETCH_OK) {
+    SRuntimesMutex.unlock();
     return status;
   }
 


Reply via email to