minart
minart copied to clipboard
Add an async RenderLoop
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.
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