Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit bc65860

Browse files
committed
Speculative fix (with warning) for an object file needing to wait on a dependent, and that dependent has yet to have an ExecutionTask assigned to it. Seen in the CI
1 parent 6467e59 commit bc65860

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/C/bam/Scripts/ObjectFile.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,14 @@ protected override void
8686
{
8787
if (!(dep is SourceFile) && !dep.Executed)
8888
{
89+
var as_module_execution = dep as Bam.Core.IModuleExecution;
90+
while (null == as_module_execution.ExecutionTask)
91+
{
92+
Bam.Core.Log.MessageAll("******** Waiting for {0} to have an execution task assigned", dep.ToString());
93+
System.Threading.Thread.Yield();
94+
}
8995
// wait for execution task to be finished
90-
var execution_task = (dep as Bam.Core.IModuleExecution).ExecutionTask;
96+
var execution_task = as_module_execution.ExecutionTask;
9197
if (null == execution_task)
9298
{
9399
throw new Bam.Core.Exception("No execution task available for dependent {0}, of {1}", dep.ToString(), this.ToString());

0 commit comments

Comments
 (0)