Skip to content

Comments

[RF-DOCS] Update Threading and Code Execution Guide [ci skip]#3

Open
OughtPuts wants to merge 19 commits intomainfrom
harriet-guides-threading-and-code-execution
Open

[RF-DOCS] Update Threading and Code Execution Guide [ci skip]#3
OughtPuts wants to merge 19 commits intomainfrom
harriet-guides-threading-and-code-execution

Conversation

@OughtPuts
Copy link
Owner

Motivation / Background

This PR has been created to update the Threading and Code Execution Guide as part of the Rails Documentation project.

Detail

The following changes have been made:

  • Phrasing and language choices have been updated for improved clarity and simplicity.
  • The structure of the guide has been slightly altered to improve flow
  • Information about asynchronous Active Record has been added.
  • The 'work in progress' label has been removed.
  • Examples of wrapped application code have been added.
  • Information on Isolated Execution State has been added.
  • A section on CurrentAttributes has been added.

Additional information

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Unrelated changes should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

@OughtPuts
Copy link
Owner Author

OughtPuts commented Dec 8, 2024

Thanks so much for your clarification comments on the To-Do @p8 - I did have one additional question but I thought it might be easier just to open the PR and then you can consider in context.

For the new CurrentAttributes section, you offered this suggestion:

WARNING: You might be tempted to store state in `Thread.current
yourself, but if you use a threaded server, watch out! Values
aren't automatically deleted after a request and this can
cause bugs.

I was a bit confused by this though, as in the API Documentation it describes:

a thread-isolated attributes singleton, which resets automatically before and after each request

...which would imply automatic deletion? Or am I misunderstanding something somewhere?

Let me know if we need something else added - happy of course to make further changes. Huge thanks!

Copy link
Collaborator

@bhumi1102 bhumi1102 left a comment

Choose a reason for hiding this comment

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

About half way done

Copy link
Collaborator

@bhumi1102 bhumi1102 left a comment

Choose a reason for hiding this comment

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

Hi @OughtPuts, Good work getting this guide done! 🎉 The edits do make it more readable!

I'm noticing something about this guide overall (nothing to do with your edits, they are great!), but the subject requires existing knowledge for any of it to make sense. The guide doesn't contain explanations for terms like threads, "parent", "child" process, deadlock. Many terms and concepts are just talked about (e.g. load interlock) without any preamble. Maybe that is okay as this guide is in the "advanced" category. But I'll leave this thought here, in case others have reactions.

@OughtPuts OughtPuts force-pushed the harriet-guides-threading-and-code-execution branch from e02c772 to d7a80c7 Compare June 8, 2025 11:17
@OughtPuts OughtPuts force-pushed the harriet-guides-threading-and-code-execution branch 2 times, most recently from c6a4dd5 to 78584d1 Compare June 12, 2025 06:58
@OughtPuts OughtPuts force-pushed the harriet-guides-threading-and-code-execution branch from 4963fdc to 357d4ff Compare November 19, 2025 20:50
@github-actions github-actions bot added the docs label Nov 19, 2025
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.

3 participants