Fixed for stricter argument matching rules

This commit is contained in:
Guido van Rossum 1994-05-16 09:26:24 +00:00
parent 1d28e1707a
commit 3ac5b00d40
1 changed files with 2 additions and 3 deletions

View File

@ -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()