Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3ac5b00

Browse files
committed
Fixed for stricter argument matching rules
1 parent 1d28e17 commit 3ac5b00

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Demo/threads/find.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ def __init__(self):
4646
self.work = []
4747
self.busy = 0
4848

49-
def addwork(self, job):
50-
if not job:
51-
raise TypeError, 'cannot add null job'
49+
def addwork(self, func, args):
50+
job = (func, args)
5251
self.mutex.acquire()
5352
self.work.append(job)
5453
self.mutex.release()

0 commit comments

Comments
 (0)