From: Ionel Cristian Mărieș Date: Thu, 1 Oct 2015 12:54:20 +0000 (+0300) Subject: Remove confusingly placed lock from example X-Git-Tag: 1.3.0~9^2~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f61a481d2c4c4ea8d74ff5a7d7e389c40367bce9;p=cached-property.git Remove confusingly placed lock from example --- diff --git a/README.rst b/README.rst index 970b5f6..b4856c9 100644 --- a/README.rst +++ b/README.rst @@ -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: