summaryrefslogtreecommitdiff
path: root/Demo/threads
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-05-16 09:26:24 +0000
committerGuido van Rossum <guido@python.org>1994-05-16 09:26:24 +0000
commitd8470e74531fca7e16802953de272823f19fc0c4 (patch)
tree3270166c7245cce3a84ae54b7039dba9adcbf9c3 /Demo/threads
parent4ce83b275876d64d6ffb226015213c2ef1628385 (diff)
downloadcpython-d8470e74531fca7e16802953de272823f19fc0c4.tar.gz
Fixed for stricter argument matching rules
Diffstat (limited to 'Demo/threads')
-rw-r--r--Demo/threads/find.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Demo/threads/find.py b/Demo/threads/find.py
index 3bc54feba0..940360abdf 100644
--- a/Demo/threads/find.py
+++ b/Demo/threads/find.py
@@ -46,9 +46,8 @@ class WorkQ:
self.work = []
self.busy = 0
- def addwork(self, job):
- if not job:
- raise TypeError, 'cannot add null job'
+ def addwork(self, func, args):
+ job = (func, args)
self.mutex.acquire()
self.work.append(job)
self.mutex.release()