Skip to content

Commit 5394383

Browse files
committed
Before the last signal is reported and the benchmark process exits,
add an artificial sleep to increase the chance of host process reading all std output.
1 parent 691d11a commit 5394383

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/BenchmarkDotNet/Engines/AnonymousPipesHost.cs

+7
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ public void Dispose()
4040

4141
public void SendSignal(HostSignal hostSignal)
4242
{
43+
if (hostSignal == HostSignal.AfterAll)
44+
{
45+
// Before the last signal is reported and the benchmark process exits,
46+
// add an artificial sleep to increase the chance of host process reading all std output.
47+
System.Threading.Thread.Sleep(1);
48+
}
49+
4350
WriteLine(Engine.Signals.ToMessage(hostSignal));
4451

4552
// read the response from Parent process, make the communication blocking

0 commit comments

Comments
 (0)