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

Clarify AsyncContext concurrency docs #2199

Merged
merged 3 commits into from
Apr 26, 2022
Merged

Conversation

Scottmitch
Copy link
Member

Modifications:
async-context.adoc provides some examples to describe
control flow and potential concurrent modification scenarios.
The example with the operator flow doesn't provide enough
explanation to understand the expected control flow.

Modifications:

  • Add more comments to the example and code which
    shows expected values on key modified "later" in the
    operator chain.

Modifications:
async-context.adoc provides some examples to describe
control flow and potential concurrent modification scenarios.
The example with the operator flow doesn't provide enough
explanation to understand the expected control flow.

Modifications:
- Add more comments to the example and code which
  shows expected values on key modified "later" in the
  operator chain.
// AsyncContext will be copied/isolated when this async source is subscribed to. Changes to the AsyncContext map from
// async operators on inner operator chain will therefore not be visible in the outer operator chain.
// AsyncContext will be copied when Single.subscribe(..) is called. Changes to the AsyncContext map from operators on
// the inner Single operator chain will therefore not be visible in the outer Publisher operator chain.
Copy link
Contributor

Choose a reason for hiding this comment

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

You may wish to add as a comment where the shareContextOnSubscribe() would go if they wanted a shared context.

Copy link
Member Author

Choose a reason for hiding this comment

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

Lets consider this as a followup PR. I don't want to overload concepts in this PR.

@Scottmitch Scottmitch merged commit 759a20f into apple:main Apr 26, 2022
@Scottmitch Scottmitch deleted the context_docs branch April 26, 2022 14:18
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.

2 participants