minart icon indicating copy to clipboard operation
minart copied to clipboard

Add an async RenderLoop

Open JD557 opened this issue 5 years ago • 1 comments

Right now, the RenderLoop mixes the state update and render logic, so it's not possible to cleanly write code with a render thread and a logic thread.

I'm not sure if having a loop with multiple threads is supported by all platforms, so this might require splitting the RenderLoop into a SyncRenderLoop and an AsyncRenderLoop.

JD557 avatar May 24 '20 10:05 JD557

One alternative here could be to add a runAsync(initialState: S): Future[S] to Loop.

This would also allow Scala Native's Execution Context to be pumped, so the Futures would run, while also make the behavior consistent with Scala.JS

JD557 avatar Sep 11 '22 15:09 JD557