Fixed busy error
authorslindal <slindal@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 5 Nov 2010 14:38:40 +0000 (14:38 +0000)
committerslindal <slindal@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 5 Nov 2010 14:38:40 +0000 (14:38 +0000)
EVE/EveHLT/AliEveEventBuffer.cxx

index 1f271e4..755c765 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();