Fixed busy error
[u/mrichter/AliRoot.git] / EVE / EveHLT / AliEveEventBuffer.cxx
index 1f271e4690e22ac338df60be1b976dcaec759896..755c7651d8b7e53a9019f7e4f2a7eafbcebfd047 100644 (file)
@@ -67,8 +67,8 @@ void AliEveEventBuffer::CreateBufferThread() {
   if(GetBusy()) {
     cout << "Buffer is busy, no thread created"<< endl;
   } else {
-    SetBusy(kTRUE);
     if ( (CalculateDifference(fBIndex[kTop],fBIndex[kLast]) < fPreBuffer) ) {
+      SetBusy(kTRUE);
       cout << "CreateBufferThread()"<<endl;
       TThread * fThread = new TThread(AliEveEventBuffer::BufferThread, (void*) this);
       fThread->Run();