Skip to content

[NFC] Add more comments to pthread mailbox infrastructure #20511

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

Merged
merged 3 commits into from
Oct 25, 2023
Merged

Conversation

tlively
Copy link
Member

@tlively tlively commented Oct 22, 2023

No description provided.

@tlively tlively requested a review from RReverser October 22, 2023 19:43
@tlively
Copy link
Member Author

tlively commented Oct 22, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

// If we are using Atomics.waitAsync as our notification mechanism, wait
// for a notification before processing the mailbox to avoid missing any
// work that could otherwise arrive after we've finished processing the
// mailbox and before we're ready for the next notification.
__emscripten_thread_mailbox_await(pthread_ptr);
callUserCallback(() => __emscripten_check_mailbox());
Copy link
Collaborator

Choose a reason for hiding this comment

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

I just noticed that this can be callUserCallback(__emscripten_check_mailbox)

Copy link
Collaborator

@RReverser RReverser left a comment

Choose a reason for hiding this comment

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

I think my questions were more about ordering of wait.value.then(...) callback vs setting flags, which this doesn't quite cover, but from recent conversation it sounds like it should be possible to change those implementation details anyway, so maybe it's not really worth documenting them for now...

@tlively tlively merged commit d581c72 into main Oct 25, 2023
@tlively tlively deleted the mailbox-comment branch October 25, 2023 16:55
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

Successfully merging this pull request may close these issues.

3 participants