concurrent_revisions
Version, currently 0.1.01 version
- 0.1.0latestJul 21, 2020
github.com/tobyapi/concurrent_revisions.cr
Concurrent Revisions for Crystal
Installation
# Add this to your shard.yml
dependencies:
concurrent_revisions:
github: tobyapi/concurrent_revisions.cr
version: ~> 0.1.0Then run:
shards installshard.yml
- Crystal
0.35.1- License
- MIT
- Author
- your-name-here <your-email-here>
Dependencies
This version declares no dependencies.
README
concurrent_revisions
Concurrent Revisions is a concurrency control model designed to guarantee determinacy, meaning that each forked task gets a conceptual copy of all the shared state, and state changes are integrated only when tasks are joined, at which time write-write conflicts are deterministically resolved.
Installation
Clone repository manually:
git clone https://github.com/TobiasGSmollett/concurrent_revisions.cr && cd concurrent_revisions.cr/
Or add the dependency to your shard.yml:
dependencies:
concurrent_revisions:
github: TobiasGSmollett/concurrent_revisions.cr
Run shards install.
Usage
The fastest way to try it is by using Crystal Playground (crystal play):
require "concurrent_revisions"
include ConcurrentRevisions
x = Versioned(Int32).new(0)
y = Versioned(Int32).new(0)
r : Revision = rfork do
x.set(1)
rfork { }
x.set(y.get)
end
x.set(2)
rjoin(r)
puts "#{x.get} #{y.get}" # => 0 0
References
Contributing
- Fork it (https://github.com/TobiasGSmollett/concurrent_revisions/fork)
- 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
- tobya - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.0- Tagged
- Jul 21, 2020
- Commit
85a0f5e4c7cc- Crystal
0.35.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/tobyapi/concurrent_revisions.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 12, 2026
- Synced
- Aug 12, 2026
- Versions
- 1