Skip to main content

Utility which provides the ability to distribute a task across a fixed number of processes, for better utilization of multiprocessing

Project description

Disttask is a utility which provides the ability to distribute a task across a fixed number of processes, for better utilization of multiprocessing.

Use it with existing single-threaded/process tools and scripts to take full advantage of your computer’s resources.

Usage: ./disttask [cmd] [concurrent tasks] [argset]
Use a %s in [cmd] where you want the args to go. use %d for the pipe number.

The application runs at most “concurrent task” # of processes ( good to match total number of processors available to this number - 1 ). It captures stdout and stderr to ensure that any output is not intertwined between the applications.

Each command should specify a “%s” to where each argument will go (one argument from @argset per application). “%d” is also available as the pipe number, but may not be very useful.

Example:

./disttask “echo %d %s” 3 “this” “is” “some” “text” “blah” “whooptie” “Doo”
0 this
1 is
2 some
0 text
1 blah
2 whooptie
0 Doo

Another Example:

Run pyflakes, using 10 simultanious processes, on all python files in subdirectories (requires shopt -s globstar. Notice the backticks, not single-quotes.)

./disttask “pyflakes %s” 10 echo **/*.py

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

disttask-1.1.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file disttask-1.1.tar.gz.

File metadata

  • Download URL: disttask-1.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for disttask-1.1.tar.gz
Algorithm Hash digest
SHA256 c31b1114a9367793a27187d9274f31b16a9b74920118d59a3a85f6688fe82b5e
MD5 2a5792d234b0a484cc2306cb9d80b925
BLAKE2b-256 a532e4a1facfb1785addef412f60a29ca41c6ee5f735b85792167bee76f091bb

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