Skip to content

Commit 1ef06e3

Browse files
Daniel Marbachramonsmits
Daniel Marbach
andauthored
Replace Yield with Delay to not hammer the CPU (#6831) (#6833)
Co-authored-by: Ramon Smits <[email protected]>
1 parent f35f416 commit 1ef06e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/NServiceBus.AcceptanceTesting/Support/ScenarioRunner.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static async Task PerformScenarios(RunDescriptor runDescriptor, ComponentRunner[
9191
}
9292
}
9393

94-
await Task.Yield();
94+
await Task.Delay(100).ConfigureAwait(false);
9595
}
9696

9797
startTime = DateTime.UtcNow;
@@ -103,7 +103,7 @@ static async Task PerformScenarios(RunDescriptor runDescriptor, ComponentRunner[
103103
throw new Exception("Some failed messages were not handled by the recoverability feature.");
104104
}
105105

106-
await Task.Yield();
106+
await Task.Delay(100).ConfigureAwait(false);
107107
}
108108
}
109109
finally

0 commit comments

Comments
 (0)