From 97e6bb162cb91b4e0bbb14c9a40824ef35cd98c8 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Thu, 18 Sep 2014 13:09:42 -0700 Subject: [PATCH] Link a few of the classes to implemented features/bugs in python This adds comments that associate the classes we have for threading usage to upstream bugs in python where similar features are being created (and potentially supported upstream). When we are able to reduce the number of supported python versions we can/should try to remove our implementations and move to the ones that may showup in the python standard library instead. Change-Id: I7b58380aeb57a58fa3b3c424c9f39de30f44f0e9 --- taskflow/types/latch.py | 7 ++++++- taskflow/utils/lock_utils.py | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/taskflow/types/latch.py b/taskflow/types/latch.py index 9aa2622d..0945a286 100644 --- a/taskflow/types/latch.py +++ b/taskflow/types/latch.py @@ -20,7 +20,12 @@ from taskflow.types import timing as tt class Latch(object): - """A class that ensures N-arrivals occur before unblocking.""" + """A class that ensures N-arrivals occur before unblocking. + + TODO(harlowja): replace with http://bugs.python.org/issue8777 when we no + longer have to support python 2.6 or 2.7 and we can only support 3.2 or + later. + """ def __init__(self, count): count = int(count) diff --git a/taskflow/utils/lock_utils.py b/taskflow/utils/lock_utils.py index dbc0b778..282756f3 100644 --- a/taskflow/utils/lock_utils.py +++ b/taskflow/utils/lock_utils.py @@ -142,6 +142,9 @@ class ReaderWriterLock(_ReaderWriterLockBase): the write lock. In the future these restrictions may be relaxed. + + This can be eventually removed if http://bugs.python.org/issue8800 ever + gets accepted into the python standard threading library... """ WRITER = 'w' READER = 'r'