Skip to content

Note when a shared field needs option instead of voption - #20594

Open
xperiandri wants to merge 1 commit into
dotnet:mainfrom
xperiandri:fix/voption-torn-read-instructions
Open

xperiandri wants to merge 1 commit into
dotnet:mainfrom
xperiandri:fix/voption-torn-read-instructions

Conversation

@xperiandri

Copy link
Copy Markdown
Contributor

The voption guidance said no field is ever a reason to pick option, cross-thread ones included. That's wrong when a field is written without a lock: option is always one atomic-sized reference, voption is a struct that can span more than one word and tear on the write once it does — as PR #20523 found for a Position field a text-view listener writes and the project options reactor reads.

The voption guidance said no field is ever a reason to pick option,
including ones shared between threads. That is wrong for a lock-free
field: option is always one atomic-sized reference, voption is a
struct that can span more than one word and tear on an unsynchronized
write. PR dotnet#20523 hit this for a Position field a text-view listener
writes and the project options reactor reads.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@xperiandri
xperiandri requested a review from a team as a code owner September 20, 2026 17:26
@github-actions github-actions Bot added the ⚠️ Affects-Agent-Config Tooling check: PR modifies AI agent instructions or workflows label Sep 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Tooling Safety Check — Affects-Agent-Config
Affects-Agent-Config: Modifies repository-wide F# agent coding instructions.

Generated by PR Tooling Safety Check · gpt56 594.8K ·

@T-Gro T-Gro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤖 🕵️ LGTM

@github-project-automation github-project-automation Bot moved this from New to In Progress in F# Compiler and Tooling Sep 21, 2026
@T-Gro T-Gro added the AI-reviewed PR reviewed by AI review council label Sep 21, 2026
@T-Gro
T-Gro self-requested a review September 21, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚠️ Affects-Agent-Config Tooling check: PR modifies AI agent instructions or workflows AI-reviewed PR reviewed by AI review council

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants