waitgroup v1.0.0
waitgroup
Simple waitgroup implementation for Crystal.
Installation
-
Add the dependency to your
shard.yml
:dependencies: waitgroup: github: dscottboggs/waitgroup
-
Run
shards install
Usage
require "waitgroup"
wg = WaitGroup.new
time_taken = Time.measure do
10.times do
wg.spawn do
sleep 1
end
end
wg.wait
end
time_taken.should be_close 1.second,
delta: 0.1.seconds
See the spec file for more examples.
Contributing
- Fork it (https://github.com/dscottboggs/waitgroup/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Verify your changes pass all tests, including formatting and linting with ameba
- Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request.
Contributors
- D. Scott Boggs - creator and maintainer
Repository
waitgroup
Owner
Statistic
- 2
- 0
- 0
- 0
- 0
- over 2 years ago
- August 29, 2020
License
MIT License
Links
Synced at
Sat, 21 Dec 2024 20:42:10 GMT
Languages