Skip to main content

Python multiprocessing fork

Project description

billiard

About

billiard is a fork of the Python 2.7 multiprocessing package. The multiprocessing package itself is a renamed and updated version of R Oudkerk’s pyprocessing package. This standalone variant is intended to be compatible with Python 2.4 and 2.5, and will draw it’s fixes/improvements from python-trunk.

  • This package would not be possible if not for the contributions of not only the current maintainers but all of the contributors to the original pyprocessing package listed here

  • Also it is a fork of the multiprocessin backport package by Christian Heims.

  • It includes the no-execv patch contributed by R. Oudkerk.

  • And the Pool improvements previously located in Celery.

Bug reporting

Please report bugs related to multiprocessing at the Python bug tracker. Issues related to billiard should be reported at http://github.com/celery/billiard/issues.

Changes

2.7.3.11 - 2012-08-01

  • Adds support for FreeBSD 7+

    Fix contributed by koobs.

  • Pool: New argument allow_restart is now required to enable the pool process sentinel that is required to restart the pool.

    It’s disabled by default, which reduces the number of file descriptors/semaphores required to run the pool.

  • Pool: Now emits a warning if a worker process exited with errorcode.

    But not if the error code is 155, which is now returned if the worker process was recycled (maxtasksperchild).

  • Python 3 compatibility fixes.

  • Python 2.5 compatibility fixes.

2.7.3.10 - 2012-06-26

  • The TimeLimitExceeded exception string representation only showed the seconds as a number, it now gives a more human friendly description.

  • Fixed typo in LaxBoundedSemaphore.shrink.

  • Pool: ResultHandler.handle_event no longer requires any arguments.

  • setup.py bdist now works

2.7.3.9 - 2012-06-03

  • Environment variable MP_MAIN_FILE envvar is now set to the path of the __main__ module when execv is enabled.

  • Pool: Errors occuring in the TaskHandler are now reported.

2.7.3.8 - 2012-06-01

  • Can now be installed on Py 3.2

  • Issue #12091: simplify ApplyResult and MapResult with threading.Event

    Patch by Charles-Francois Natali

  • Pool: Support running without TimeoutHandler thread.

    • The with_*_thread arguments has also been replaced with a single threads=True argument.

    • Two new pool callbacks:

      • on_timeout_set(job, soft, hard)

        Applied when a task is executed with a timeout.

      • on_timeout_cancel(job)

        Applied when a timeout is cancelled (the job completed)

2.7.3.7 - 2012-05-21

  • Fixes Python 2.5 support.

2.7.3.6 - 2012-05-21

  • Pool: Can now be used in an event loop, without starting the supporting threads (TimeoutHandler still not supported)

    To facilitate this the pool has gained the following keyword arguments:

    • with_task_thread

    • with_result_thread

    • with_supervisor_thread

    • on_process_up

      Callback called with Process instance as argument whenever a new worker process is added.

      Used to add new process fds to the eventloop:

      def on_process_up(proc):
          hub.add_reader(proc.sentinel, pool.maintain_pool)
    • on_process_down

      Callback called with Process instance as argument whenever a new worker process is found dead.

      Used to remove process fds from the eventloop:

      def on_process_down(proc):
          hub.remove(proc.sentinel)
    • semaphore

      Sets the semaphore used to protect from adding new items to the pool when no processes available. The default is a threaded one, so this can be used to change to an async semaphore.

    And the following attributes:

    - ``readers``
    
        A map of ``fd`` -> ``callback``, to be registered in an eventloop.
        Currently this is only the result outqueue with a callback
        that processes all currently incoming results.

    And the following methods:

    - ``did_start_ok``
    
        To be called after starting the pool, and after setting up the
        eventloop with the pool fds, to ensure that the worker processes
        didn't immediately exit caused by an error (internal/memory).
    
    - ``maintain_pool``
    
        Public version of ``_maintain_pool`` that handles max restarts.
  • Pool: Process too frequent restart protection now only counts if the process had a non-successful exitcode.

    This to take into account the maxtasksperchild option, and allowing processes to exit cleanly on their own.

  • Pool: New options max_restart + max_restart_freq

    This means that the supervisor can’t restart processes faster than max_restart’ times per max_restart_freq seconds (like the Erlang supervisor maxR & maxT settings).

    The pool is closed and joined if the max restart frequency is exceeded, where previously it would keep restarting at an unlimited rate, possibly crashing the system.

    The current default value is to stop if it exceeds 100 * process_count restarts in 1 seconds. This may change later.

    It will only count processes with an unsuccessful exit code, this is to take into account the maxtasksperchild setting and code that voluntarily exits.

  • Pool: The WorkerLostError message now includes the exitcode of the process that disappeared.

2.7.3.5 - 2012-05-09

  • Now always cleans up after sys.exc_info() to avoid cyclic references.

  • ExceptionInfo without arguments now defaults to sys.exc_info.

  • Forking can now be disabled using the MULTIPROCESSING_FORKING_DISABLE environment variable.

    Also this envvar is set so that the behavior is inherited after execv.

  • The semaphore cleanup process started when execv is used now sets a useful process name if the setproctitle module is installed.

  • Sets the FORKED_BY_MULTIPROCESSING environment variable if forking is disabled.

2.7.3.4 - 2012-04-27

  • Added billiard.ensure_multiprocessing()

    Raises NotImplementedError if the platform does not support multiprocessing (e.g. Jython).

2.7.3.3 - 2012-04-23

  • PyPy now falls back to using its internal _multiprocessing module, so everything works except for forking_enable(False) (which silently degrades).

  • Fixed Python 2.5 compat issues.

  • Uses more with statements

  • Merged some of the changes from the Python 3 branch.

2.7.3.2 - 2012-04-20

  • Now installs on PyPy/Jython (but does not work).

2.7.3.1 - 2012-04-20

  • Python 2.5 support added.

2.7.3.0 - 2012-04-20

  • Updated from Python 2.7.3

  • Python 2.4 support removed, now only supports 2.5, 2.6 and 2.7. (may consider py3k support at some point).

  • Pool improvments from Celery.

  • no-execv patch added (http://bugs.python.org/issue8713)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

billiard-2.7.3.11.tar.gz (122.1 kB view details)

Uploaded Source

Built Distributions

billiard-2.7.3.11-py2.7-macosx-10.6-intel.egg (207.0 kB view details)

Uploaded Source

billiard-2.7.3.11-py2.7-linux-i686.egg (219.5 kB view details)

Uploaded Source

billiard-2.7.3.11-py2.6-macosx-10.8-intel.egg (207.4 kB view details)

Uploaded Source

billiard-2.7.3.11-py2.6-linux-i686.egg (220.1 kB view details)

Uploaded Source

billiard-2.7.3.11-py2.5-macosx-10.8-x86_64.egg (207.8 kB view details)

Uploaded Source

billiard-2.7.3.11-py2.5-linux-i686.egg (219.8 kB view details)

Uploaded Source

File details

Details for the file billiard-2.7.3.11.tar.gz.

File metadata

  • Download URL: billiard-2.7.3.11.tar.gz
  • Upload date:
  • Size: 122.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for billiard-2.7.3.11.tar.gz
Algorithm Hash digest
SHA256 e2dec7a46ee8f39a58208cb557b94c0f5b5c91632a55c14de20c0ed5964f05e3
MD5 f7e725162fcae22568f61bb25e953808
BLAKE2b-256 c0760fc24b32256728253d3f919a89e613b0cc2fac4c25c993d695f0a45f6d99

See more details on using hashes here.

Provenance

File details

Details for the file billiard-2.7.3.11-py2.7-macosx-10.6-intel.egg.

File metadata

File hashes

Hashes for billiard-2.7.3.11-py2.7-macosx-10.6-intel.egg
Algorithm Hash digest
SHA256 22715c3d1ff705e956df5b549b1bbbae6e29af5aee7cec0e97a6b57d90d28cd7
MD5 94abc09a667ae402ffedb95e26bf301f
BLAKE2b-256 3b55877b0a1e21c4179c0d5d59604054c3aa890536ad9abefe6f3c80d97b00e0

See more details on using hashes here.

Provenance

File details

Details for the file billiard-2.7.3.11-py2.7-linux-i686.egg.

File metadata

File hashes

Hashes for billiard-2.7.3.11-py2.7-linux-i686.egg
Algorithm Hash digest
SHA256 789efd49607d733987474d2f5f82b82a48b1bee0e446620b32a5d7ff502245b5
MD5 5dd922517609deb98a0c49a48977344f
BLAKE2b-256 73faa17643a7b2c5f68dfd144f263dfd43d0065efd913feae2fc73a2ebcd6748

See more details on using hashes here.

Provenance

File details

Details for the file billiard-2.7.3.11-py2.6-macosx-10.8-intel.egg.

File metadata

File hashes

Hashes for billiard-2.7.3.11-py2.6-macosx-10.8-intel.egg
Algorithm Hash digest
SHA256 9eb9bc6bf17612a17783979be00bd2cc8d0a62b8a9623c3e023cb53673cf4835
MD5 602c5773071af2bf6adadfd13edcfb4a
BLAKE2b-256 476bee53122b514f7f139f68f4558658581821bcb42572ad269a9c17c21500ac

See more details on using hashes here.

Provenance

File details

Details for the file billiard-2.7.3.11-py2.6-linux-i686.egg.

File metadata

File hashes

Hashes for billiard-2.7.3.11-py2.6-linux-i686.egg
Algorithm Hash digest
SHA256 43518ed88e3607a2ff4daa9ff9bba80d955c861d1e25b898b1b783871633c2db
MD5 ac10adfb6cc873976b7d402b7bba68e6
BLAKE2b-256 e8b971e72b2ea5b4a4d4167f83c58ab51640e2910f7829c7bf26927399a49231

See more details on using hashes here.

Provenance

File details

Details for the file billiard-2.7.3.11-py2.5-macosx-10.8-x86_64.egg.

File metadata

File hashes

Hashes for billiard-2.7.3.11-py2.5-macosx-10.8-x86_64.egg
Algorithm Hash digest
SHA256 a5ec019c02d31ffa34edc194be400491667df251a5786b9dec38611c568927cb
MD5 0cbbf4f5563e30d4c16d82a42a150575
BLAKE2b-256 531fdc8cadcf199ddf881dbad10d7f8bf2be672c40bc531365b67216c06ef52f

See more details on using hashes here.

Provenance

File details

Details for the file billiard-2.7.3.11-py2.5-linux-i686.egg.

File metadata

File hashes

Hashes for billiard-2.7.3.11-py2.5-linux-i686.egg
Algorithm Hash digest
SHA256 d80a040c3b4569b5cfa788dd22ed5b6b1c6ec443bc3bdfae12e87cfeed210307
MD5 f3139025e708f69c1ff87a4efb325d72
BLAKE2b-256 18281db33ff69e1cc80d2dc0a4cccbb3a28ca42cc7858f9808168e81b2c11d4e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page