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

Worker implementation #417

Open
Sygmei opened this issue Jan 6, 2022 · 0 comments
Open

Worker implementation #417

Sygmei opened this issue Jan 6, 2022 · 0 comments
Labels
feature The issue is about a new incoming / requested feature
Projects

Comments

@Sygmei
Copy link
Member

Sygmei commented Jan 6, 2022

Workers are independant Lua states in a thread.

They can be used to perform CPU intensive tasks or IO blocking tasks without coroutine support.

Since it lives in an independant thread, it will not block the main loop.
Workers can live in their thread alone or share it with other Workers (1 state per thread or multiple states per thread).

Workers could be represented as either a Scene/GameObject or a Component (such as Sprite / Collider) or a simple userdata that lives inside an existing Lua state. We need to decide what would be the most logical choice.

Events can be used to communicate with the Worker and we could have default events such as "Completed"

@Sygmei Sygmei added the feature The issue is about a new incoming / requested feature label Jan 6, 2022
@Sygmei Sygmei added this to To do in Version 0.6 via automation Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature The issue is about a new incoming / requested feature
Projects
Version 0.6
  
To do
Development

No branches or pull requests

1 participant