Skip to content

Conversation

luke-gruber
Copy link

No description provided.

@luke-gruber luke-gruber force-pushed the doc_concurrency_guide branch 2 times, most recently from d6290e2 to 0297ae8 Compare September 17, 2025 20:34
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Sep 17, 2025
## The VM Lock

There's only one VM lock and its for critical sections that can only be entered by one ractor at a time.
Without ractors, the VM lock is useless. It does not stop all ractors from running, as ractors can run
Copy link
Member

Choose a reason for hiding this comment

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

Noob Q: what's the relationship/difference between the VM Lock mentioned here and GVL?

Copy link
Author

Choose a reason for hiding this comment

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

This is actually explained in a different section.

Copy link
Member

Choose a reason for hiding this comment

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

Thx I'm seeing it now. I think it's worth moving it forward as that's likely known by most Ruby devs looking at this doc, and it'd be great to avoid confusion between them as early as possible.


## The VM Lock

There's only one VM lock and its for critical sections that can only be entered by one ractor at a time.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
There's only one VM lock and its for critical sections that can only be entered by one ractor at a time.
There's only one VM lock and it's for critical sections that can only be entered by one ractor at a time.

# Concurrency Guide

This is a guide to thinking about concurrency in the native cruby source code, whether that's
contributing to Ruby by writing C or Rust. This doesn't touch on native extensions, only the core
Copy link
Member

Choose a reason for hiding this comment

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

If by Rust you mean YJIT & ZJIT, maybe we can be more specific here? Like `contributing to Ruby interpreter and its JIT compilers (YJIT & ZJIT).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants