Skip to content

sdeoras/wg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wg

wg stands for wait-group. It is a shell command that executes other shell commands asynchronously.

installation

go get github.com/sdeoras/wg/wg

example

# initialize wg and send to background
wg init &

# run some commands
wg run -- sleep 1
wg run -- sleep 1
wg run -- sleep 1

# wait for command completion
wg wait

# note that three sleep commands ran asynchronously and total wait time was only 1 second

server and a client

wg init starts a server and wg run starts a client. It is, therefore, necessary to run wg init in background and to call wg wait to not only wait for command completion but also to kill the server.

limitations

  • server is not designed to run in multiple instances. wg init will fail if a server is already running.

About

Go util to run bash commands async way

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published