Skip to main content

parallel processing fork manager inspired by Parallel::Prefork in CPAN

Project description

This module is inspired by Parallel::Prefork in CPAN.

As Parallel::Prefork, this module is intended to be some operations done in parallel.

Simple example of usage is followings

>>> from python_prefork import PythonPrefork
>>> pp = PythonPrefork()
>>> while not pp.signal_received:
>>>     if pp.start(): continue
>>>
>>>     run() # do some task in child process
>>>
>>>     pp.finish()
>>> pp.wait_all_children()
Some options can be set in constructor

[ max_workers ] maximum number of child processes to fork

[trap_signals] arrays of signals to be trapped. parent process will send these signals to all children

[on_reap_cb] function to be called when a child is end. This function must have two parameters, child pid and exit status.

Project details


Download files

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

Source Distribution

python_prefork-0.1.1.tar.gz (1.6 kB view details)

Uploaded Source

Built Distribution

python_prefork-0.1.1-py2.5.egg (5.7 kB view details)

Uploaded Source

File details

Details for the file python_prefork-0.1.1.tar.gz.

File metadata

File hashes

Hashes for python_prefork-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0a92a7312b5bf498fd20dbe0325fb574f8cf72062efae1d3c393515aa2b622ba
MD5 08ea012045ab0f0314cc77595211ca70
BLAKE2b-256 e49a31d9c88424f5da086069307058efd8220f9bdf7abd5a62b48e8d78fedb2e

See more details on using hashes here.

File details

Details for the file python_prefork-0.1.1-py2.5.egg.

File metadata

File hashes

Hashes for python_prefork-0.1.1-py2.5.egg
Algorithm Hash digest
SHA256 f74d20583ba18244f7a111794cf1deb93f5b736aedd2f4cf8ac773e630424cbc
MD5 e0515040e140c009588faca200d189f3
BLAKE2b-256 50ca1e78c838064f2621fbeb7122ccc8c0f453e2666b27b40d1fb710e25be117

See more details on using hashes here.

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