Release d03c7bd7995b3c967ec523eaddf376d5; BugFix for threaded queue (multiple jobs wit identical priority)

This commit is contained in:
Dirk Alders 2021-01-11 01:11:51 +01:00
parent 9fbd98f39c
commit c9e1e20764
3 changed files with 5407 additions and 5177 deletions

View File

@ -70,6 +70,7 @@ class queue(object):
"""
class job(object):
def __init__(self, priority, callback, *args, **kwargs):
self.time = time.time()
self.priority = priority
self.callback = callback
self.args = args
@ -79,7 +80,10 @@ class queue(object):
self.callback(queue, *self.args, **self.kwargs)
def __lt__(self, other):
return self.priority < other.priority
if self.priority != other.priority:
return self.priority < other.priority
else:
return self.time < other.time
def __init__(self, expire=True):
self.__expire = expire

File diff suppressed because it is too large Load Diff

Binary file not shown.