Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Remove internal Lock/Reader/Writer structs from System.Composition.Convention #6033

Merged
merged 1 commit into from
Feb 11, 2016
Merged

Remove internal Lock/Reader/Writer structs from System.Composition.Convention #6033

merged 1 commit into from
Feb 11, 2016

Conversation

Clockwork-Muse
Copy link

Per #2995, remove ReaderLock stuct (and the related WriterLock/Lock structs) in preference for addressing the underlying lock (ReaderWriterLockSlim) directly.

Fixes #2995

@dsplaisted , @stephentoub

@Clockwork-Muse Clockwork-Muse changed the title Remove internal Lock/Reader/Writer structs. Remove internal Lock/Reader/Writer structs from System.Composition.Convention Feb 11, 2016
@stephentoub
Copy link
Member

Thanks, @Clockwork-Muse.

I'm not opposed to the notion of structs similar to these, but a) the interlockeds they're using are pure overhead if the structs are used correctly and are dangerously misleading if they're not (since two copies of the struct would not communicate), b) they're only used in a few places in the whole codebase (the write one is used only once), and c) this special Lock type doesn't seem to provide any value and is itself just overhead (maybe the intention at one point was to be able to plug in a different lock?)

In any event, LGTM.

stephentoub added a commit that referenced this pull request Feb 11, 2016
…ntion_Lock

Remove internal Lock/Reader/Writer structs from System.Composition.Convention
@stephentoub stephentoub merged commit a971f4a into dotnet:master Feb 11, 2016
@Clockwork-Muse Clockwork-Muse deleted the System.Composition.Convention_Lock branch February 11, 2016 13:15
@Clockwork-Muse
Copy link
Author

@stephentoub - I was debating the intent of c a little, yeah, but wasn't coming up with much good other than either having a new regular ReaderWriterLock, or something that would likely require changing that abstraction... /shrugs/ maybe it's from before the RWSlim? Seems unlikely, though.

@karelz karelz modified the milestone: 1.0.0-rtm Dec 3, 2016
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…osition.Convention_Lock

Remove internal Lock/Reader/Writer structs from System.Composition.Convention

Commit migrated from dotnet/corefx@a971f4a
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants