Skip to content

Commit d6ecd36

Browse files
authored
Prevent .NET from randomly calling WndProc in RequestCompositionBatchCommitAsync (#16804)
This method isn't reentrancy-friendly
1 parent e627821 commit d6ecd36

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Avalonia.Base/Rendering/Composition/Compositor.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ public CompositionBatch RequestCompositionBatchCommitAsync()
108108
Dispatcher.VerifyAccess();
109109
if (_nextCommit == null)
110110
{
111+
using var _ = NonPumpingLockHelper.Use();
111112
_nextCommit = new ();
112113
var pending = _pendingBatch;
113114
if (pending != null)

0 commit comments

Comments
 (0)