From 6f55028ffa6f8d8a0b0b8db77e373b33f02e625f Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 31 Jul 2012 16:35:59 +0200 Subject: [PATCH] Changed: #1440 Clear update flags --HG-- branch : build_pipeline_v3 --- .../service/module_pipeline_master.cpp | 6 ++-- .../service/module_pipeline_slave.cpp | 30 +++++++++++-------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/code/nel/tools/pipeline/service/module_pipeline_master.cpp b/code/nel/tools/pipeline/service/module_pipeline_master.cpp index a317c09b4..379572bfc 100644 --- a/code/nel/tools/pipeline/service/module_pipeline_master.cpp +++ b/code/nel/tools/pipeline/service/module_pipeline_master.cpp @@ -402,7 +402,7 @@ public: // TODO } - /// When the user aborts slave-side, when slave-side exits, etc + /// When the user aborts slave-side, when slave-side exits, etc (assume the master requested abort or the slave crashed) virtual void slaveAbortedBuildTask(NLNET::IModuleProxy *sender) { // TODO @@ -414,8 +414,8 @@ public: m_BuildTaskQueue.abortedTask(slave->ActiveTaskId); slave->ActiveTaskId = 0; // --slave->SaneBehaviour; // legal behaviour - // slave->TimeOutStamp = NLMISC::CTime::getSecondsSince1970() + 30; // timeout for 30 seconds on this slave - CInfoFlags::getInstance()->addFlag(PIPELINE_INFO_SLAVE_ABORTED); + // slave->TimeOutStamp = NLMISC::CTime::getSecondsSince1970() + 30; // timeout for 30 seconds on this slave // no timeout + // CInfoFlags::getInstance()->addFlag(PIPELINE_INFO_SLAVE_ABORTED); // don't keep a count // TODO } diff --git a/code/nel/tools/pipeline/service/module_pipeline_slave.cpp b/code/nel/tools/pipeline/service/module_pipeline_slave.cpp index 49dffa136..52ad906ad 100644 --- a/code/nel/tools/pipeline/service/module_pipeline_slave.cpp +++ b/code/nel/tools/pipeline/service/module_pipeline_slave.cpp @@ -204,20 +204,26 @@ public: break; case STATUS_UPDATE: { - if (NLMISC::CSynchronized::CAccessor(&m_StatusUpdateMasterDone).value() - && NLMISC::CSynchronized::CAccessor(&m_StatusUpdateSlaveDone).value()) + NLMISC::CSynchronized::CAccessor statusUpdateMasterDone(&m_StatusUpdateMasterDone); + if (statusUpdateMasterDone.value()) { - if (m_AbortRequested) + NLMISC::CSynchronized::CAccessor statusUpdateSlaveDone(&m_StatusUpdateSlaveDone); + if (statusUpdateSlaveDone.value()) { - nlinfo("Aborted slave task after status update"); - finalizeAbort(); - } - else - { - nlinfo("Slave task: Status update done"); - m_SlaveTaskState = SOMEWHERE_INBETWEEN; - // Done with the status updating, now do something fancey - // ... TODO ... + statusUpdateMasterDone.value() = false; + statusUpdateSlaveDone.value() = false; + if (m_AbortRequested) + { + nlinfo("Aborted slave task after status update"); + finalizeAbort(); + } + else + { + nlinfo("Slave task: Status update done"); + m_SlaveTaskState = SOMEWHERE_INBETWEEN; + // Done with the status updating, now do something fancey + // ... TODO ... + } } } }