CsWinRT icon indicating copy to clipboard operation
CsWinRT copied to clipboard

Stop relying on UB in 'IContextCallback' dispatch logic

Open Sergio0694 opened this issue 1 year ago • 1 comments

See https://github.com/dotnet/runtime/blob/main/docs/design/specs/Memory-model.md#cross-thread-access-to-local-variables. This PR fixes accessing the callback state (which is a managed object) from the native callback invoked on the target thread.

Sergio0694 avatar Nov 09 '24 23:11 Sergio0694