Skip to content

yupiik/gallop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gallop

Enable to give some throttling to concurrent executions in bash (or other) scripts.

Build

Important
must be executed on a linux amd64 or arm64 depending on your target platform.
mvn clean install arthur:native-image

Idea

The idea behind the program is to create a thread pool (arbitrary set to the concurrency size but this is a detail) and associate to it a throttler (Semaphore). The concurrency set in the start command will limit the enabled concurrency for exec done by the exec command.

This enables to submit hundreds of tasks and throttle them without having to take care of that in the script which is always very fragile.

Tip
using multiple identifiers - we recommend to use ` identifier - the script pid - as base but you can decline it, ex `_pool1 - you can have multiple concurrency in the same script.

Usage

link:src/sample/demo.sh[role=include]

Installation

Either use hava and execute the binary (java -cp gallop.jar <args>) or directly the native binary of ~23M: gallop.

About

A light concurrency executor for scripts

Resources

License

Stars

Watchers

Forks

Packages

No packages published