KEMBAR78
Delegate closures should be immutable by kennykerr · Pull Request #3706 · microsoft/windows-rs · GitHub
Skip to content

Conversation

@kennykerr
Copy link
Collaborator

@kennykerr kennykerr commented Aug 8, 2025

They may not look like it, but WinRT delegates are implemented as COM interfaces and may well be called concurrently from other languages just like any COM interface method.

Fixes: #3705

Copy link
Collaborator

@ChrisDenton ChrisDenton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, ooph. Yeah, this is necessary.

@kennykerr kennykerr merged commit 075fc67 into master Aug 11, 2025
29 checks passed
@kennykerr kennykerr deleted the delegate-fn branch August 11, 2025 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WinRT delegates are constructed with an FnMut even though they may be called concurrently

2 participants