Remove confusingly placed lock from example
authorIonel Cristian Mărieș <contact@ionelmc.ro>
Thu, 1 Oct 2015 12:54:20 +0000 (15:54 +0300)
committerIonel Cristian Mărieș <contact@ionelmc.ro>
Thu, 1 Oct 2015 12:54:20 +0000 (15:54 +0300)
README.rst

index 970b5f6cce335f6ba2de5cd98af332a112c07381..b4856c989a68ae6d41f7cf3b1d4eb2a064b9d30b 100644 (file)
@@ -126,9 +126,7 @@ unfortunately causes problems with the standard ``cached_property``. In this cas
                 dice and moving their pieces."""
 
             sleep(1)
-            # Need to guard this since += isn't atomic.
-            with self.lock:
-                self.boardwalk_price += 50
+            self.boardwalk_price += 50
             return self.boardwalk_price
 
 Now use it: