Commit 12ca410a authored by Denis Bilenko's avatar Denis Bilenko

update a comment

parent 0c13bd51
...@@ -171,8 +171,8 @@ class local(_localbase): ...@@ -171,8 +171,8 @@ class local(_localbase):
def __getattribute__(self, name): def __getattribute__(self, name):
d = object.__getattribute__(self, '_local__dicts').get(getcurrent()) d = object.__getattribute__(self, '_local__dicts').get(getcurrent())
if d is None: if d is None:
# we can obtain the lock here and not earlier, because the above has no switches out # it's OK to acquire the lock here and not earlier, because the above code won't switch out
# however, subclassed __init__ may switch so we do need obtain the lock here # however, subclassed __init__ might switch, so we do need to acquire the lock here
lock = object.__getattribute__(self, '_local__lock') lock = object.__getattribute__(self, '_local__lock')
lock.acquire() lock.acquire()
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment