Registering a YAML converter while another thread serializes no longer throws #356
No reviewers
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lantea-one/ninlil!356
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/354-yaml-converter-race"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
YamlSerializerkeeps its shared converters in a static list.AddConverteradded to it with no lock, whileGetDeserializerandGetSerializerenumerated it, so a YAML read at the same moment as a registration could throwInvalidOperationException: Collection was modified. Develop run 1282 failed this way inYamlInputFormatterTests.The list is now guarded by a lock, and the builders enumerate a snapshot taken under it: the same pattern
JsonSerializeralready uses. The newYamlSerializerProcessWideTestsadds 400 distinct converters on 8 threads while 8 more threads serialize, in the non-parallel process-wide collection.Checked:
Category!=RequiresDocker: 47 projects green, 0 warnings. csharpier and the link check pass.Closes #354
🤖 Generated with Claude Code
https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK