Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chocobo1/concurrent
Run commands concurrently!
https://github.com/chocobo1/concurrent
concurrent cpp parallel utility
Last synced: about 2 months ago
JSON representation
Run commands concurrently!
- Host: GitHub
- URL: https://github.com/chocobo1/concurrent
- Owner: Chocobo1
- License: gpl-3.0
- Created: 2016-09-15T06:54:58.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-25T13:17:36.000Z (over 6 years ago)
- Last Synced: 2024-10-13T18:41:09.665Z (3 months ago)
- Topics: concurrent, cpp, parallel, utility
- Language: C++
- Homepage:
- Size: 47.9 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Concurrent [![TravisCI_status](https://travis-ci.org/Chocobo1/concurrent.svg?branch=master)](https://travis-ci.org/Chocobo1/concurrent) [![AppVeyor_status](https://ci.appveyor.com/api/projects/status/github/Chocobo1/concurrent?branch=master&svg=true)](https://ci.appveyor.com/project/Chocobo1/concurrent)
A naive tool that take cmd line commands (from text file or pipe) and execute concurrently:
![screencast.gif](./screencast.gif)
It will automatically distribute the commands to CPU cores, the logical ones as much as you have except one (which is reserved for OS).
If you seek a more powerful tool: [GNU Parallel](https://www.gnu.org/software/parallel/).
## Usage
* Issue commands via stdin (pipe) input:
```shell
someCmdGenerator | concurrent -
```* Issue commands via file:
```shell
concurrent
```## Special directives
* Fence: Will wait for **all** executing commands (i.e. all commands before this directive) to finish and then continue on.
```
### Fence ###
```
or
```
rem Fence rem
```* Change the number of commands executing in parallel:
```
### Threads: <# of jobs> ###
```
or
```
rem Threads: <# of jobs> rem
```* Comment keyword: {`#`, `rem`}, the same as shell script & batch comment keyword.
Lines starting with these keywords will be ignored.
## Compile
Get yourself a [C++11 compiler](http://en.cppreference.com/w/cpp/compiler_support) and run:
```shell
cd src
make -j2
```To run tests:
```shell
git submodule update --init --remote --depth 1 # init git submodule
cd src
make -j2 test
```## Downloads
Download win32 executables [here](../../releases)
## Third-party code
* [Catch](https://github.com/philsquared/Catch)