mirror of
https://github.com/python/cpython.git
synced 2025-11-11 14:44:57 +00:00
Fixed for stricter argument matching rules
This commit is contained in:
parent
1d28e1707a
commit
3ac5b00d40
1 changed files with 2 additions and 3 deletions
|
|
@ -46,9 +46,8 @@ class WorkQ:
|
||||||
self.work = []
|
self.work = []
|
||||||
self.busy = 0
|
self.busy = 0
|
||||||
|
|
||||||
def addwork(self, job):
|
def addwork(self, func, args):
|
||||||
if not job:
|
job = (func, args)
|
||||||
raise TypeError, 'cannot add null job'
|
|
||||||
self.mutex.acquire()
|
self.mutex.acquire()
|
||||||
self.work.append(job)
|
self.work.append(job)
|
||||||
self.mutex.release()
|
self.mutex.release()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue