From 75dca0bd4d85ebd8b69f8b71f5381267d5b9dcd6 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Sun, 12 Jan 2014 17:28:25 -0800 Subject: [PATCH] Alter is_locked() helper comment The is_locked() helper method comment was created when we used threading2 but since we don't use it anymore we need to adjust that comment to reflect the current usage. Change-Id: I06051fb2d65b8c871e916d7e64e6056ecff3afda --- taskflow/utils/lock_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/taskflow/utils/lock_utils.py b/taskflow/utils/lock_utils.py index 8ae7dcd8..11f5bf23 100644 --- a/taskflow/utils/lock_utils.py +++ b/taskflow/utils/lock_utils.py @@ -79,8 +79,8 @@ class MultiLock(object): def __enter__(self): def is_locked(lock): - # NOTE(harlowja): the threading2 lock doesn't seem to have this - # attribute, so that's why we are checking it existing first. + # NOTE(harlowja): reentrant locks (rlock) don't have this + # attribute, but normal non-reentrant locks do, how odd... if hasattr(lock, 'locked'): return lock.locked() return False