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

Would it make sense to spec both CPU yield and an OS yield? #6

Open
juj opened this issue Apr 9, 2024 · 0 comments
Open

Would it make sense to spec both CPU yield and an OS yield? #6

juj opened this issue Apr 9, 2024 · 0 comments

Comments

@juj
Copy link

juj commented Apr 9, 2024

In an earlier conversation it was highlighted that the Atomics.microWait() primitive is a CPU level yield/pause instruction, not a OS-level "schedule out the remaining time slice of the thread" level instruction.

That gave a thought to discuss: would it be useful to incorporate both of these types of instructions into the spec?

I am not completely sure what the modern tuning tradeoffs and scenarios typically are with each, though with a search through Unity's several millions of lines codebase with the hierarchy of all the various third party projects as dependencies, I do see both types of yields being used in native code. (and I presume these have been tuned by various platform experts on desktop/Android/iOS over decades of development)

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