Repository navigation
Declare threading contracts for collection owners - #5494
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the changes making collection-owner threading contracts explicit.
No open issues 🎉
What changed in this PR
This PR makes factory-established threading contracts explicit on private windows-collections owners in preparation for #5469. Storage and public factory bounds remain unchanged; the global IUnknownImpl bound is outside this PR.
Changes:
- Add
SendandSyncdeclarations to collection owners and derived views, iterators, pairs, and event arguments. - Require
VectorOwnerimplementations to beSend + Sync. - Update retirement probes to use thread-safe callbacks, synchronized observations, and typed owner captures.
| File | Description |
|---|---|
crates/libs/collections/src/vector.rs |
Passes typed owners to vector retirement checks. |
crates/libs/collections/src/vector_view.rs |
Declares threading contracts for vector views. |
crates/libs/collections/src/vector_tests.rs |
Makes vector retirement probes thread-safe. |
crates/libs/collections/src/storage.rs |
Documents factory contracts and declares vector storage threading traits. |
crates/libs/collections/src/read_only_vector.rs |
Declares threading contracts for read-only vector owners. |
crates/libs/collections/src/observable_vector.rs |
Passes typed owners to observable-vector retirement checks. |
crates/libs/collections/src/observable_map.rs |
Declares map and event-argument threading traits; updates retirement checks. |
crates/libs/collections/src/map.rs |
Declares map threading traits and updates retirement checks. |
crates/libs/collections/src/map_view.rs |
Declares threading contracts for map views and snapshot iterators. |
crates/libs/collections/src/map_tests.rs |
Makes value and key retirement probes thread-safe. |
crates/libs/collections/src/key_value_pair.rs |
Declares threading contracts for derived key-value pairs. |
crates/libs/collections/src/iterable.rs |
Declares threading contracts for immutable iterable owners. |
crates/libs/collections/src/immutable_vector.rs |
Adds Send + Sync bounds to VectorOwner. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make the private collection owners carry the threading contract established by their factories, including derived owners. Update retirement probes to use thread-safe captures.
Preparation for #5469. Storage and public factory bounds are unchanged; the global
IUnknownImplbound stays out of this PR.