GithubHelp home page GithubHelp logo

ericcrosson / bash-barrier Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 0.0 10 KB

A synchronization barrier for your terminal

License: MIT License

Shell 47.46% Nix 52.54%
cli synchronization bash barrier

bash-barrier's Introduction

bash-barrier

This project provides a barrier for the synchronization of shell scripts or terminal commands. The shells to be synchronized can be local or remote.

Install

This script is standalone -- download it and ensure it is in your $PATH.

Use

The basic blocking syntax is to invoke the script:

barrier

This will pause execution until another shell has reached the barrier. To wait for multiple notifications, add a numeric argument:

barrier 3

To notify waiting shells that you have reached a barrier, invoke barrier with the hosts to notify as arguments:

barrier localhost
barrier host1 host2 host3

Advanced

To use multiple, independent barriers that should not notify each other, customize the PORT environment variable in the executing shell. For example:

PORT=5656 barrier

will wait for a different shell to execute:

PORT=5656 barrier localhost

and any barriers listening on the default port (64926) will not be affected.

Limitations

This is implemented in-shell for-shell. This is not a performant package. In use cases where multiple broadcasts may be received in a narrow time window, some may be dropped by the listener. The casual user will be fine.

bash-barrier's People

Contributors

ericcrosson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bash-barrier's Issues

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.