Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an async RenderLoop #19

Open
JD557 opened this issue May 24, 2020 · 1 comment
Open

Add an async RenderLoop #19

JD557 opened this issue May 24, 2020 · 1 comment

Comments

@JD557
Copy link
Owner

JD557 commented May 24, 2020

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
Copy link
Owner Author

JD557 commented Sep 11, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant