Commit 66a6f573 authored by Denis Bilenko's avatar Denis Bilenko

add XXX to threadpool.py

parent 1fc48720
...@@ -9,6 +9,9 @@ from gevent.pool import IMap, IMapUnordered ...@@ -9,6 +9,9 @@ from gevent.pool import IMap, IMapUnordered
from gevent.lock import Semaphore from gevent.lock import Semaphore
from gevent._threading import Lock, Queue, start_new_thread from gevent._threading import Lock, Queue, start_new_thread
# XXX apply_e is ugly and must not be needed
# XXX apply() should re-raise everything
__all__ = ['ThreadPool', __all__ = ['ThreadPool',
'ThreadResult'] 'ThreadResult']
...@@ -47,6 +50,7 @@ class ThreadPool(object): ...@@ -47,6 +50,7 @@ class ThreadPool(object):
return '<%s at 0x%x %s/%s/%s>' % (self.__class__.__name__, id(self), len(self), self.size, self.maxsize) return '<%s at 0x%x %s/%s/%s>' % (self.__class__.__name__, id(self), len(self), self.size, self.maxsize)
def __len__(self): def __len__(self):
# XXX just do unfinished_tasks property
return self.task_queue.unfinished_tasks return self.task_queue.unfinished_tasks
def _get_size(self): def _get_size(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment