|
@@ -48,11 +48,6 @@ TERMINATE = 0x3
|
|
|
|
|
|
SHUTDOWN_SOCKET_TIMEOUT = 5.0
|
|
|
|
|
|
-MAXTASKS_NO_BILLIARD = """\
|
|
|
-maxtasksperchild enabled but billiard C extension not installed!
|
|
|
-This may lead to a deadlock, please install the billiard C extension.
|
|
|
-"""
|
|
|
-
|
|
|
logger = get_logger(__name__)
|
|
|
|
|
|
|
|
@@ -145,25 +140,6 @@ class Pool(bootsteps.StartStopComponent):
|
|
|
except AttributeError:
|
|
|
pass
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- try:
|
|
|
- import _billiard
|
|
|
- except ImportError:
|
|
|
-
|
|
|
- if w.max_tasks_per_child:
|
|
|
- logger.warning(MAXTASKS_NO_BILLIARD)
|
|
|
- _quick_put = pool._pool._quick_put
|
|
|
- def quick_put(obj):
|
|
|
- _quick_put(obj, hub.maintain_pool)
|
|
|
- pool._pool._quick_put = quick_put
|
|
|
-
|
|
|
pool.init_callbacks(
|
|
|
on_process_up=lambda w: add_reader(w.sentinel, maintain_pool),
|
|
|
on_process_down=lambda w: remove(w.sentinel),
|