less locking for screen connection, force more concurrency

This commit is contained in:
Vinzenz Schroeter 2024-04-30 23:49:39 +02:00 committed by RobbersDaughter
parent 0b10695e07
commit 0e93b1356f
10 changed files with 143 additions and 93 deletions

View file

@ -48,11 +48,13 @@ internal sealed class SendToServicePointDisplay : IFrameConsumer
};
}
public async ValueTask OnFrameDoneAsync(GamePixelGrid gamePixelGrid, PixelGrid observerPixels)
public async Task OnFrameDoneAsync(GamePixelGrid gamePixelGrid, PixelGrid observerPixels)
{
if (DateTime.Now < _nextFrameAfter)
return;
_nextFrameAfter = DateTime.Now + _minFrameTime;
await Task.Yield();
RefreshScores();