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.2.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

python_prefork-0.1.2-py2.5.egg (11.1 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for python_prefork-0.1.2.tar.gz
Algorithm Hash digest
SHA256 caade93f2043b423d8f20e3737cedcbd766b589741099f0010468ead85fc4b1e
MD5 a57f3fcbd95662a77749a0d639e102b8
BLAKE2b-256 81f445531a8f8919f5bf9d839527101b827c4f2828415e88ac93f9f124facc56

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_prefork-0.1.2-py2.5.egg
Algorithm Hash digest
SHA256 3043e3816cd0907ba55bc7f427fbef2234955842dbe4763e32a920a4e2db3af9
MD5 aab0030763ca75de9e239c018f1e6bb2
BLAKE2b-256 24a5fc6a6ff1719460ab4b99303d18d037385ed251bad1e8af8f797356b50978

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