-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Document pthread ordering of sync/async commands [ci skip] #12546
base: main
Are you sure you want to change the base?
Conversation
@@ -310,6 +310,11 @@ int emscripten_sync_run_in_main_runtime_thread_(EM_FUNC_SIGNATURE sig, void *fun | |||
// - Note that multiple asynchronous commands from a single pthread/Worker are | |||
// guaranteed to be executed on the main thread in the program order they | |||
// were called in. | |||
// - Note that synchronous and asynchronous commands are *also* guaranteed to | |||
// be executed in order. That is, sync and async commands cannot be | |||
// reordered. The only difference between a sync and async command is that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe instead That is, sync and async commands will not get reordered in the queue, but will be executed in the sequentially consistent order in which they were dispatched.
?, because "cannot be reordered" can be read a bit vaguely: Who cannot reorder them? Can I not reorder sync and async commands? Why not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, thanks, updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, optionally with that change?
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant. |
No description provided.