pond
Version, currently 1.0.013 versions
- 2.0.2latestMay 16, 2026
- 2.0.1not indexedAug 10, 2026
- 2.0.0not indexedAug 10, 2026
- 1.0.1not indexedAug 10, 2026
- 1.0.0not indexedAug 10, 2026
- 0.3.5not indexedAug 10, 2026
- 0.3.4not indexedAug 10, 2026
- 0.3.3not indexedAug 10, 2026
- 0.3.2not indexedAug 10, 2026
- 0.3.1not indexedAug 10, 2026
- 0.3.0not indexedAug 10, 2026
- 0.2.0not indexedAug 10, 2026
- 0.1.0not indexedAug 10, 2026
github.com/GrottoPress/pond
Crystal WaitGroups without channels or counters
Nothing has been indexed for 1.0.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
pond:
github: GrottoPress/pond
version: ~> 1.0.0Then run:
shards installshard.yml
No shard.yml has been indexed for 1.0.0. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
Pond
Pond is a Crystal implementation of a WaitGroup, without channels or explicit counters. Pond automatically keeps track of all its fibers, and waits until all of them complete execution.
Installation
-
Add the dependency to your
shard.yml:dependencies: pond: github: GrottoPress/pond -
Run
shards install
Usage
-
Spawn fibers and wait on them:
require "pond" pond = Pond.new 1000.times do |_| pond.fill { do_work } # <= Spawns fiber and passes block to it end pond.drain # <= Waits for fibers to completeThe code above is the same as:
require "pond" Pond.drain do |pond| 1000.times do |_| pond.fill { do_work } end end # <= Drains pond automatically at the end of the block -
You may spawn nested fibers:
In this case, all ancestor fibers have to be added to the pond, otherwise Pond can't guarantee any of them would complete.
require "pond" pond = Pond.new pond.fill do pond.fill do pond.fill { do_work } end end pond.drainNote that, while you can fill a pond that was created in a another fiber, draining has to be done in the same fiber the pond was created in. This is to prevent potential deadlocks.
require "pond" pond = Pond.new pond.fill { do_work } spawn { pond.drain } # <= Error!
Development
Run tests with crystal spec -Dpreview_mt. You may set CRYSTAL_WORKERS environment variable with export CRYSTAL_WORKERS=<number>, before running tests.
Contributing
- Fork it
- Switch to the
masterbranch:git checkout master - Create your feature branch:
git checkout -b my-new-feature - Make your changes, updating changelog and documentation as appropriate.
- Commit your changes:
git commit - Push to the branch:
git push origin my-new-feature - Submit a new Pull Request against the
GrottoPress:masterbranch.
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
1.0.0- Tagged
- Aug 10, 2026
- Commit
815bf0fb72a1- Indexed
- not yet
Dependents
Repository
github.com/GrottoPress/pond
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 24, 2026
- Synced
- Sep 24, 2026
- Versions
- 13