summaryrefslogtreecommitdiffstats
path: root/Lib/threading.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-09-18 02:26:39 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-09-18 02:26:39 (GMT)
commitb64bec3ec078d66a34175b9dec55eaac5c821b46 (patch)
tree2b9660e0ad789f4cf73d9c4fa5d69d5f252c238e /Lib/threading.py
parenta86f0c17a1385c07710d894b93a1c13159c0b57f (diff)
downloadcpython-b64bec3ec078d66a34175b9dec55eaac5c821b46.zip
cpython-b64bec3ec078d66a34175b9dec55eaac5c821b46.tar.gz
cpython-b64bec3ec078d66a34175b9dec55eaac5c821b46.tar.bz2
Whitespace normalization.
Diffstat (limited to 'Lib/threading.py')
-rw-r--r--Lib/threading.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/threading.py b/Lib/threading.py
index 4906674..fbf40cd 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -489,12 +489,12 @@ def Timer(*args, **kwargs):
class _Timer(Thread):
"""Call a function after a specified number of seconds:
-
+
t = Timer(30.0, f, args=[], kwargs={})
t.start()
t.cancel() # stop the timer's action if it's still waiting
"""
-
+
def __init__(self, interval, function, args=[], kwargs={}):
Thread.__init__(self)
self.interval = interval
@@ -502,11 +502,11 @@ class _Timer(Thread):
self.args = args
self.kwargs = kwargs
self.finished = Event()
-
+
def cancel(self):
"""Stop the timer if it hasn't finished yet"""
self.finished.set()
-
+
def run(self):
self.finished.wait(self.interval)
if not self.finished.isSet():