**************************************************************************/
#include "AliDimIntNotifier.h"
-
+#include <TError.h>
+#include <signal.h>
//______________________________________________________________________________
// Full description of AliDimIntNotifier
AliDimIntNotifier::AliDimIntNotifier(const TString& service) :
DimUpdatedInfo(service, -1),
+ fReThreader(),
fNotifyLck(kTRUE),
- fNotifyCnd(&fNotifyLck),
fLastMessage(-1)
{
fReThreader.Connect("Timeout()", "AliDimIntNotifier", this, "DimMessage()");
{
fReThreader.Reset();
fReThreader.TurnOn();
+ pthread_kill((pthread_t)fgMainThreadId, SIGALRM);
}
void AliDimIntNotifier::StopTimer()
if (TThread::SelfId() != fgMainThreadId)
{
StartTimer();
- fNotifyCnd.Wait();
}
else
{
- Warning("infoHandler", "DIM message received from CINT thread.");
+ ::Warning("DIMinfoHandler", "DIM message received from CINT thread.");
DimMessage();
}
fNotifyLck.UnLock();
if (TThread::SelfId() != fgMainThreadId)
{
StartTimer();
- fNotifyCnd.Wait();
}
else
{
if (fLastMessage != -1)
{
Emit("DimMessage(Int_t)", fLastMessage);
- printf("Notify %d\n", fLastMessage);
- }
- else
- {
- printf("NOTNotify %d\n", fLastMessage);
}
- fNotifyLck.Lock();
- fNotifyCnd.Signal();
- fNotifyLck.UnLock();
}