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

Document pthread ordering of sync/async commands [ci skip] #12546

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

kripken
Copy link
Member

@kripken kripken commented Oct 19, 2020

No description provided.

@kripken kripken mentioned this pull request Oct 19, 2020
@kripken kripken requested a review from juj October 29, 2020 21:49
@@ -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
Copy link
Collaborator

@juj juj Nov 10, 2020

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, thanks, updated.

Copy link
Collaborator

@juj juj left a 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?

Base automatically changed from master to main March 8, 2021 23:49
@stale
Copy link

stale bot commented Apr 16, 2022

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.

@stale stale bot added the wontfix label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants