GithubHelp home page GithubHelp logo

elvis2131 / bash-parallel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thilinaba/bash-parallel

0.0 0.0 0.0 7 KB

Parallel processing in Bash with limited number of concurrent forks

License: Apache License 2.0

Shell 100.00%

bash-parallel's Introduction

bash-parallel

This is a simple example of parallel processing in Bash with limited number of concurrent forks. This allows us to run multiple time consuming tasks in parallel, yet avoid forkbombs by executing too many taks at once.


Refer to the Blog Post for the beginer's guide




Variable definition

Variable Description
MAX_POOL_SIZE Defines how many maximum number of background jobs we need to be running at a given time.
JOB_LIST Holds the path to a text file which contains the tasks we need to process.
OUTPUT Holds the file path to the output file, which will be written by the "process_job()" function
CURRENT_POOL_SIZE Keep track how many jobs are currently running during the program runtime. This is used to decide whether to stop creating new background jobs and wait for the running jobs to finish.

bash-parallel's People

Contributors

thilinaba avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.