-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement 'ConditionalWeakTable<TKey,TValue>.Remove' API #112263
base: main
Are you sure you want to change the base?
Implement 'ConditionalWeakTable<TKey,TValue>.Remove' API #112263
Conversation
Note regarding the
|
1 similar comment
Note regarding the
|
/// The key may get garbage collected during the Remove() operation. If so, | ||
/// Remove() will not fail or throw, however, the return value can be either true or false | ||
/// depending on who wins the race. | ||
/// The key may get garbage collected during the <see cref="Remove(TKey)"/> operation. If so, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless Remove is inlined, and presumably today it can't be due to the lock
resulting in a try/finally, how could the key be garbage collected during the Remove call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, this comment was there before this change. Perhaps we should ask someone from the GC team?
Closes #111925