Skip to content

Commit dbb0411

Browse files
committed
spawner: Rely on blocking request instead of sleeping.
1 parent c864b31 commit dbb0411

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Or, if you already have it:
1212

1313
`pip install mpf mpf-mc --pre --upgrade`
1414

15-
After that, `mpf --version` should return at least **MPF v0.55.0-dev.11**.
15+
After that, `mpf --version` should return at least **MPF v0.55.0-dev.12**.
1616

1717
## Usage
1818

VisualPinball.Engine.Mpf.Test/Program.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Diagnostics;
34
using System.Threading.Tasks;
45
using VisualPinball.Engine.Mpf;
56

@@ -9,6 +10,7 @@ class Program
910
{
1011
static async Task Main(string[] args)
1112
{
13+
var s = Stopwatch.StartNew();
1214
var mpfApi = new MpfApi(@"../../../VisualPinball.Engine.Mpf/machine");
1315

1416
await mpfApi.Launch();
@@ -18,7 +20,7 @@ await mpfApi.Start(new Dictionary<string, bool> {
1820
});
1921

2022
var descr = await mpfApi.GetMachineDescription();
21-
Console.WriteLine($"Description: {descr}");
23+
Console.WriteLine($"Description: {descr} in {s.ElapsedMilliseconds}ms");
2224
}
2325
}
2426
}

VisualPinball.Engine.Mpf/MpfClient.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public async Task Start(Dictionary<string, bool> initialSwitches)
2424
var machineState = new MachineState();
2525
machineState.InitialSwitchStates.Add(initialSwitches);
2626
_client.Start(machineState);
27-
await Task.Delay(1000); // TODO remove once it's blocking
2827
}
2928

3029
public async Task<MachineDescription> GetMachineDescription() {

0 commit comments

Comments
 (0)