wait_groups
Simplest implementation of golang's wait groups
Installation
-
Add the dependency to your
shard.yml
:dependencies: wait_groups: github: axvm/wait_group.cr
-
Run
shards install
Usage
require "wait_group"
wg = WaitGroup.new
wg.add
spawn do
sleep(5)
wg.done
end
wg.wait # and your main fiber will be released once wg.done will be called
Development
Do whatever you want
Contributing
- Fork it (https://github.com/axvm/wait_group.cr)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Aleksandr Marchenko - creator and maintainer