Browse Source

Get rid of lockAcquired.

pull/4922/head
Dariusz Komosinski 6 years ago
parent
commit
bf400cd353
  1. 6
      src/Windows/Avalonia.Win32/FramebufferManager.cs

6
src/Windows/Avalonia.Win32/FramebufferManager.cs

@ -28,9 +28,7 @@ namespace Avalonia.Win32
public ILockedFramebuffer Lock() public ILockedFramebuffer Lock()
{ {
var lockAcquired = false; Monitor.Enter(_lock);
Monitor.Enter(_lock, ref lockAcquired);
LockedFramebuffer? fb = null; LockedFramebuffer? fb = null;
@ -58,7 +56,7 @@ namespace Avalonia.Win32
{ {
// We free the lock when for whatever reason framebuffer was not created. // We free the lock when for whatever reason framebuffer was not created.
// This allows for a potential retry later. // This allows for a potential retry later.
if (fb is null && lockAcquired) if (fb is null)
{ {
Monitor.Exit(_lock); Monitor.Exit(_lock);
} }

Loading…
Cancel
Save