浏览代码

Added some comments

Signed-off-by: amzn-mike <[email protected]>
amzn-mike 3 年之前
父节点
当前提交
777a5485d1
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      Code/Tools/AssetProcessor/native/resourcecompiler/rcjob.cpp

+ 3 - 0
Code/Tools/AssetProcessor/native/resourcecompiler/rcjob.cpp

@@ -371,7 +371,10 @@ namespace AssetProcessor
             // We will only continue once we get exclusive lock on the source file
             while (!AssetUtilities::CheckCanLock(inputFile))
             {
+                // Wait for a while before checking again, we need to let some time pass for the other process to finish whatever work it is doing
                 QThread::msleep(g_sleepDurationForLockingAndFingerprintChecking);
+
+                // If AP shutdown is requested, the job is canceled or we exceeded the max wait time, abort the loop and mark the job as canceled
                 if (listener.WasQuitRequested() || cancelListener.IsCancelled() || (ticker.elapsed() > g_jobMaximumWaitTime))
                 {
                     result.m_resultCode = AssetBuilderSDK::ProcessJobResult_Cancelled;