less locking for screen connection, force more concurrency
This commit is contained in:
parent
0b10695e07
commit
0e93b1356f
10 changed files with 143 additions and 93 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue