celery.concurrency.prefork

    class celery.concurrency.prefork.TaskPool(limit=None, putlocks=True, forking_enable=True, callbacks_propagate=(), \*options*)

    Multiprocessing Pool implementation.

    • BlockingPool

      Pool 的别名

    • Pool

      AsynPool 的别名

    • num_processes None

    • on_start()[源代码]

      Run the task pool.

      Will pre-fork all workers so they’re ready to accept tasks.

    • on_stop()

      Gracefully stop the pool.

    • register_with_event_loop(loop)[源代码]

    • uses_semaphore = True

    • write_stats = None

    celery.concurrency.prefork.process_initializer(app, hostname)

    Pool child process initializer.

    This will initialize a child pool process to ensure the correct app instance is used and things like logging works.

    celery.concurrency.prefork.process_destructor(pid, exitcode)[源代码]

    Pool child process destructor

    Dispatch the signal.