Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

AaronRobinsonMSFT
Copy link
Member

This removes locks and instead assumes the collection is immutable.

Fixes #73754

This removes locks and instead assumes the collection is immutable.
@AaronRobinsonMSFT
Copy link
Member Author

/cc @dotnet/interop-contrib

@AaronRobinsonMSFT
Copy link
Member Author

@stephentoub The CI is green. Any other thoughts?

@jkotas
Copy link
Member

jkotas commented Sep 21, 2022

Use array instead of List
Revert "Use array instead of List"

Was there an actual problem or you did not like the result? (It looks better to me with arrays instead of List.)

@AaronRobinsonMSFT
Copy link
Member Author

Use array instead of List
Revert "Use array instead of List"

Was there an actual problem or you did not like the result? (It looks better to me with arrays instead of List.)

It was an option. However, I needed to create a RemoveAll local with annoying logic so deferred to just using List<T>. Either works and appear correct, other than the "Remove" logic you pointed out above. Let me see about simplifying it further.

doesn't seem to be any value to using that mechanism. An added
bonus is that it simplifies the logic.
@AaronRobinsonMSFT
Copy link
Member Author

@jkotas @stephentoub I switched back to using arrays, let me know if you prefer List<T>. I also removed the Delegate.Combine logic. My biggest concern with changing that related to threading since this is a COM code path. Looking through it, I no longer have any concerns so it was removed.

@AaronRobinsonMSFT AaronRobinsonMSFT merged commit e4d115a into dotnet:main Sep 22, 2022
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the runtime_73754 branch September 22, 2022 19:28
@AaronRobinsonMSFT
Copy link
Member Author

/backport to release/7.0

@github-actions
Copy link
Contributor

Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3108191020

@AaronRobinsonMSFT
Copy link
Member Author

/backport to release/6.0

@github-actions
Copy link
Contributor

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/3108193116

@ghost ghost locked as resolved and limited conversation to collaborators Oct 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

COM event with recursion .net 6 problem
5 participants