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

Coroutine Dispatchers #50

Open
Bluexin opened this issue Dec 20, 2018 · 2 comments
Open

Coroutine Dispatchers #50

Bluexin opened this issue Dec 20, 2018 · 2 comments

Comments

@Bluexin
Copy link

Bluexin commented Dec 20, 2018

I plan on implementing Coroutine Dispatchers for the Minecraft main threads (was thinking about doing the Client thread and the Main/Server thread, each where applicable of course), and submitting a PR here.

However, I am not sure whether to assign one to Dispatchers.Main, which is confined to the Main thread operating with UI objects (from the docs).
The reason I'm not sure is because while the doc is pretty clear about this, when we talk about the main thread in mc we're usually talking about the server thread (integrated server on single-player), which might lead to confusion.

Any thoughts?

@2xsaiko
Copy link

2xsaiko commented Dec 20, 2018

I'm pretty sure the main thread on the client is the render thread (especially since there's not always an integrated server running), and that's what I'd think of when someone says "main thread"

@thecodewarrior
Copy link

I feel like "main thread" is too vague. Saying simply "client" or "server" is much simpler and clearer.

I already implemented dispatchers much like this in LibLib, so you could start from there:

And usage:

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

3 participants