Skip to content

Delegate closures should be immutable#3706

Merged
kennykerr merged 2 commits intomasterfrom
delegate-fn
Aug 11, 2025
Merged

Delegate closures should be immutable#3706
kennykerr merged 2 commits intomasterfrom
delegate-fn

Conversation

@kennykerr
Copy link
Copy Markdown
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
Copy Markdown
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