sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
ThreadSafe::Util::Striped64#retry_update
Handles cases of updates involving initialization, resizing, creating new Cells, and/or contention. See above for explanation. This method suffers the usual non-modularity problems of optimistic retry code, relying on rechecked sets of reads. Arguments: [+x+] the value [+hash_code+] hash code used [+x+] false if CAS failed before call
Edit
git clone [email protected]:sonic-pi-net/sonic-pi.git
cd sonic-pi
open app/server/ruby/vendor/thread_safe/lib/thread_safe/util/striped64.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-ThreadSafe--Util--Striped64-retry_update-for-pr
# Commit to gitgit add app/server/ruby/vendor/thread_safe/lib/thread_safe/util/striped64.rbgit commit -m "better docs for ThreadSafe::Util::Striped64#retry_update"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-ThreadSafe--Util--Striped64-retry_update-for-pr
hub pull-request
# Celebrate!