projects
/
theonering
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f9d1c94
)
Minor bug fix in async pool
author
Ed Page
<eopage@byu.net>
Wed, 17 Mar 2010 02:52:35 +0000
(21:52 -0500)
committer
Ed Page
<eopage@byu.net>
Wed, 17 Mar 2010 02:52:35 +0000
(21:52 -0500)
src/util/go_utils.py
patch
|
blob
|
history
diff --git
a/src/util/go_utils.py
b/src/util/go_utils.py
index
ef6cb72
..
b3682ba
100644
(file)
--- a/
src/util/go_utils.py
+++ b/
src/util/go_utils.py
@@
-131,7
+131,7
@@
class Timeout(object):
return False
return False
-__QUEUE_EMPTY = object()
+_QUEUE_EMPTY = object()
class AsyncPool(object):
class AsyncPool(object):
@@
-151,7
+151,7
@@
class AsyncPool(object):
self.__isRunning = False
for _ in algorithms.itr_available(self.__workQueue):
pass # eat up queue to cut down dumb work
self.__isRunning = False
for _ in algorithms.itr_available(self.__workQueue):
pass # eat up queue to cut down dumb work
- self.__workQueue.put(__QUEUE_EMPTY)
+ self.__workQueue.put(_QUEUE_EMPTY)
def add_task(self, func, args, kwds, on_success, on_error):
task = func, args, kwds, on_success, on_error
def add_task(self, func, args, kwds, on_success, on_error):
task = func, args, kwds, on_success, on_error
@@
-172,7
+172,7
@@
class AsyncPool(object):
def __consume_queue(self):
while True:
task = self.__workQueue.get()
def __consume_queue(self):
while True:
task = self.__workQueue.get()
- if task is __QUEUE_EMPTY:
+ if task is _QUEUE_EMPTY:
break
func, args, kwds, on_success, on_error = task
break
func, args, kwds, on_success, on_error = task