[haiku-commits] BRANCH looncraz-github.CAP-dirty [c8b66e9c1993] src/servers/app/drawing/interface/local

  • From: looncraz-github.CAP-dirty <community@xxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 21 Mar 2015 20:46:37 +0100 (CET)

added 1 changeset to branch 'refs/remotes/looncraz-github/CAP-dirty'
old head: d875da1923eb07e6cbe645defc6b508b4da523b9
new head: c8b66e9c19935abbc477cfbec616f29824cc027a
overview: https://github.com/looncraz/haiku/compare/d875da1923eb...c8b66e9c1993

----------------------------------------------------------------------------

c8b66e9c1993: WeakLazyLocker
  
  Try to get the lock when it seems safe to do so in SetLazyServerLock()

                                        [ looncraz <looncraz@xxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Commit:      c8b66e9c19935abbc477cfbec616f29824cc027a
Author:      looncraz <looncraz@xxxxxxxxxxxx>
Date:        Sat Mar 21 19:32:51 2015 UTC

----------------------------------------------------------------------------

1 file changed, 3 insertions(+), 2 deletions(-)
src/servers/app/drawing/interface/local/WeakLazyLocker.cpp | 5 +++--

----------------------------------------------------------------------------

diff --git a/src/servers/app/drawing/interface/local/WeakLazyLocker.cpp 
b/src/servers/app/drawing/interface/local/WeakLazyLocker.cpp
index 9729a39..1fe8999 100644
--- a/src/servers/app/drawing/interface/local/WeakLazyLocker.cpp
+++ b/src/servers/app/drawing/interface/local/WeakLazyLocker.cpp
@@ -43,8 +43,9 @@ bool
 WeakLazyLocker::SetLazyServerLock()
 {
        fServerLazyLock = true;
-       if (!fClientLock)
-               fServerLock = true;
+       if (!fClientLock
+               && fLock.LockWithTimeout(10) == B_OK)
+                       fServerLock = true;
 
        return IsServerLocked();
 }


Other related posts:

  • » [haiku-commits] BRANCH looncraz-github.CAP-dirty [c8b66e9c1993] src/servers/app/drawing/interface/local - looncraz-github . CAP-dirty