Rubygems | Latest Versions for atomichttps://rubygems.org/gems2023-09-30T04:04:14Zatomic (1.1.101-java)https://rubygems.org/gems/atomic/versions/1.1.101-java2018-05-10T18:33:14ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.101)https://rubygems.org/gems/atomic/versions/1.1.1012018-05-10T18:33:00ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.100)https://rubygems.org/gems/atomic/versions/1.1.1002018-02-25T18:36:10ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.99-java)https://rubygems.org/gems/atomic/versions/1.1.99-java2015-01-26T22:08:32ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.99)https://rubygems.org/gems/atomic/versions/1.1.992015-01-26T22:08:16ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.16)https://rubygems.org/gems/atomic/versions/1.1.162014-03-17T13:11:46ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.16-java)https://rubygems.org/gems/atomic/versions/1.1.16-java2014-03-17T13:11:23ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.15-java)https://rubygems.org/gems/atomic/versions/1.1.15-java2014-02-26T16:57:35ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.15)https://rubygems.org/gems/atomic/versions/1.1.152014-02-26T16:58:00ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.14)https://rubygems.org/gems/atomic/versions/1.1.142013-09-11T00:25:55ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.14-java)https://rubygems.org/gems/atomic/versions/1.1.14-java2013-09-11T00:25:03ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.13-java)https://rubygems.org/gems/atomic/versions/1.1.13-java2013-08-14T11:54:30ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.13)https://rubygems.org/gems/atomic/versions/1.1.132013-08-14T11:55:34ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.12-java)https://rubygems.org/gems/atomic/versions/1.1.12-java2013-08-03T04:38:01ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.12)https://rubygems.org/gems/atomic/versions/1.1.122013-08-03T04:37:01ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.12.pre1)https://rubygems.org/gems/atomic/versions/1.1.12.pre12013-08-03T04:27:48ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.11)https://rubygems.org/gems/atomic/versions/1.1.112013-08-03T02:52:11ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.11-java)https://rubygems.org/gems/atomic/versions/1.1.11-java2013-08-03T02:53:05ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.10-java)https://rubygems.org/gems/atomic/versions/1.1.10-java2013-06-26T16:48:03ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.10)https://rubygems.org/gems/atomic/versions/1.1.102013-06-26T16:48:45ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.9-java)https://rubygems.org/gems/atomic/versions/1.1.9-java2013-05-06T17:47:25ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.9)https://rubygems.org/gems/atomic/versions/1.1.92013-05-06T17:47:03ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.8)https://rubygems.org/gems/atomic/versions/1.1.82013-04-16T14:28:43ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
= An atomic reference implementation for JRuby, Rubinius, and MRI.
== Changes since 1.1.7
* 0b1cd2d Add license to gemspec.
* e8d43f1 Limit gem description to just commit log.
* 6869b89 Version 1.1.8.
* ed84820 Add numeric CAS logic for fallback, MRI, and Rubinius.
* 40eca8e Make test work under 1.8-compat.
* b6398e5 Add some missing license headers.
* c291231 Allow forcing fallback impl.
* 6c2ce92 Fix #21 by moving win32 CFLAGS tweak above other test compiles.
* e59e92b Add CAS tests for more numeric types.
* 0749145 Add pkg/ and *.gem to gitignore.
* 073b4c1 Partial fix for numeric idempotence differences across Rubies.
atomic (1.1.8-java)https://rubygems.org/gems/atomic/versions/1.1.8-java2013-04-16T14:28:51ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
= An atomic reference implementation for JRuby, Rubinius, and MRI.
== Changes since 1.1.7
* 0b1cd2d Add license to gemspec.
* e8d43f1 Limit gem description to just commit log.
* 6869b89 Version 1.1.8.
* ed84820 Add numeric CAS logic for fallback, MRI, and Rubinius.
* 40eca8e Make test work under 1.8-compat.
* b6398e5 Add some missing license headers.
* c291231 Allow forcing fallback impl.
* 6c2ce92 Fix #21 by moving win32 CFLAGS tweak above other test compiles.
* e59e92b Add CAS tests for more numeric types.
* 0749145 Add pkg/ and *.gem to gitignore.
* 073b4c1 Partial fix for numeric idempotence differences across Rubies.
atomic (1.1.7-java)https://rubygems.org/gems/atomic/versions/1.1.7-java2013-04-11T16:53:32ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
= An atomic reference implementation for JRuby, Rubinius, and MRI.
== Changes since 1.1.6
* fa74e58 Bump version to 1.1.7.
* 9b58cf0 Merge pull request #20 from lazyspark/master
* 14fc4a9 Removed compiled gem from src
* 7d0ade6 Changing the arch to native, to make it successfully compile using mingw
== Summary
This library provides:
* an Atomic class that guarantees atomic updates to its contained value
The Atomic class provides accessors for the contained "value" plus two update methods:
* update will run the provided block, passing the current value and replacing it with the block result iff the value has not been changed in the mean time. It may run the block repeatedly if there are other concurrent updates in progress.
* try_update will run the provided block, passing the current value and replacing it with the block result. If the value changes before the update can happen, it will throw Atomic::ConcurrentUpdateError.
The atomic repository is at http://github.com/headius/ruby-atomic.
== Usage
The simplest way to use "atomic" is to call the "update" or "try_update" methods.
"try_update" and "update" both call the given block, passing the current value and using the block's result as the new value. If the value is updated by another thread before the block completes, "try update" raises a ConcurrentUpdateError and "update" retries the block. Because "update" may call the block several times when multiple threads are all updating the same value, the block's logic should be kept as simple as possible.
require 'atomic'
my_atomic = Atomic.new(0)
my_atomic.update {|v| v + 1}
begin
my_atomic.try_update {|v| v + 1}
rescue Atomic::ConcurrentUpdateError => cue
# deal with it (retry, propagate, etc)
end
It's also possible to use the regular get/set operations on the Atomic, if you want to avoid the exception and respond to contended changes in some other way.
my_atomic = Atomic.new(0)
my_atomic.value # => 0
my_atomic.value = 1
my_atomic.swap(2) # => 1
my_atomic.compare_and_swap(2, 3) # => true, updated to 3
my_atomic.compare_and_swap(2, 3) # => false, current is not 2
== Building
As of 1.1.0, JDK8 is required to build the atomic gem, since it attempts to use the new atomic Unsafe.getAndSetObject method only in JDK8. The resulting code should still work fine as far back as Java 5.
atomic (1.1.7)https://rubygems.org/gems/atomic/versions/1.1.72013-04-11T16:53:01ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
= An atomic reference implementation for JRuby, Rubinius, and MRI.
== Changes since 1.1.6
* fa74e58 Bump version to 1.1.7.
* 9b58cf0 Merge pull request #20 from lazyspark/master
* 14fc4a9 Removed compiled gem from src
* 7d0ade6 Changing the arch to native, to make it successfully compile using mingw
== Summary
This library provides:
* an Atomic class that guarantees atomic updates to its contained value
The Atomic class provides accessors for the contained "value" plus two update methods:
* update will run the provided block, passing the current value and replacing it with the block result iff the value has not been changed in the mean time. It may run the block repeatedly if there are other concurrent updates in progress.
* try_update will run the provided block, passing the current value and replacing it with the block result. If the value changes before the update can happen, it will throw Atomic::ConcurrentUpdateError.
The atomic repository is at http://github.com/headius/ruby-atomic.
== Usage
The simplest way to use "atomic" is to call the "update" or "try_update" methods.
"try_update" and "update" both call the given block, passing the current value and using the block's result as the new value. If the value is updated by another thread before the block completes, "try update" raises a ConcurrentUpdateError and "update" retries the block. Because "update" may call the block several times when multiple threads are all updating the same value, the block's logic should be kept as simple as possible.
require 'atomic'
my_atomic = Atomic.new(0)
my_atomic.update {|v| v + 1}
begin
my_atomic.try_update {|v| v + 1}
rescue Atomic::ConcurrentUpdateError => cue
# deal with it (retry, propagate, etc)
end
It's also possible to use the regular get/set operations on the Atomic, if you want to avoid the exception and respond to contended changes in some other way.
my_atomic = Atomic.new(0)
my_atomic.value # => 0
my_atomic.value = 1
my_atomic.swap(2) # => 1
my_atomic.compare_and_swap(2, 3) # => true, updated to 3
my_atomic.compare_and_swap(2, 3) # => false, current is not 2
== Building
As of 1.1.0, JDK8 is required to build the atomic gem, since it attempts to use the new atomic Unsafe.getAndSetObject method only in JDK8. The resulting code should still work fine as far back as Java 5.
atomic (1.1.6-java)https://rubygems.org/gems/atomic/versions/1.1.6-java2013-04-06T18:18:48ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
= An atomic reference implementation for JRuby, Rubinius, and MRI.
== Changes since 1.1.5
== Summary
This library provides:
* an Atomic class that guarantees atomic updates to its contained value
The Atomic class provides accessors for the contained "value" plus two update methods:
* update will run the provided block, passing the current value and replacing it with the block result iff the value has not been changed in the mean time. It may run the block repeatedly if there are other concurrent updates in progress.
* try_update will run the provided block, passing the current value and replacing it with the block result. If the value changes before the update can happen, it will throw Atomic::ConcurrentUpdateError.
The atomic repository is at http://github.com/headius/ruby-atomic.
== Usage
The simplest way to use "atomic" is to call the "update" or "try_update" methods.
"try_update" and "update" both call the given block, passing the current value and using the block's result as the new value. If the value is updated by another thread before the block completes, "try update" raises a ConcurrentUpdateError and "update" retries the block. Because "update" may call the block several times when multiple threads are all updating the same value, the block's logic should be kept as simple as possible.
require 'atomic'
my_atomic = Atomic.new(0)
my_atomic.update {|v| v + 1}
begin
my_atomic.try_update {|v| v + 1}
rescue Atomic::ConcurrentUpdateError => cue
# deal with it (retry, propagate, etc)
end
It's also possible to use the regular get/set operations on the Atomic, if you want to avoid the exception and respond to contended changes in some other way.
my_atomic = Atomic.new(0)
my_atomic.value # => 0
my_atomic.value = 1
my_atomic.swap(2) # => 1
my_atomic.compare_and_swap(2, 3) # => true, updated to 3
my_atomic.compare_and_swap(2, 3) # => false, current is not 2
== Building
As of 1.1.0, JDK8 is required to build the atomic gem, since it attempts to use the new atomic Unsafe.getAndSetObject method only in JDK8. The resulting code should still work fine as far back as Java 5.
atomic (1.1.6)https://rubygems.org/gems/atomic/versions/1.1.62013-04-06T18:20:08ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
= An atomic reference implementation for JRuby, Rubinius, and MRI.
== Changes since 1.1.5
== Summary
This library provides:
* an Atomic class that guarantees atomic updates to its contained value
The Atomic class provides accessors for the contained "value" plus two update methods:
* update will run the provided block, passing the current value and replacing it with the block result iff the value has not been changed in the mean time. It may run the block repeatedly if there are other concurrent updates in progress.
* try_update will run the provided block, passing the current value and replacing it with the block result. If the value changes before the update can happen, it will throw Atomic::ConcurrentUpdateError.
The atomic repository is at http://github.com/headius/ruby-atomic.
== Usage
The simplest way to use "atomic" is to call the "update" or "try_update" methods.
"try_update" and "update" both call the given block, passing the current value and using the block's result as the new value. If the value is updated by another thread before the block completes, "try update" raises a ConcurrentUpdateError and "update" retries the block. Because "update" may call the block several times when multiple threads are all updating the same value, the block's logic should be kept as simple as possible.
require 'atomic'
my_atomic = Atomic.new(0)
my_atomic.update {|v| v + 1}
begin
my_atomic.try_update {|v| v + 1}
rescue Atomic::ConcurrentUpdateError => cue
# deal with it (retry, propagate, etc)
end
It's also possible to use the regular get/set operations on the Atomic, if you want to avoid the exception and respond to contended changes in some other way.
my_atomic = Atomic.new(0)
my_atomic.value # => 0
my_atomic.value = 1
my_atomic.swap(2) # => 1
my_atomic.compare_and_swap(2, 3) # => true, updated to 3
my_atomic.compare_and_swap(2, 3) # => false, current is not 2
== Building
As of 1.1.0, JDK8 is required to build the atomic gem, since it attempts to use the new atomic Unsafe.getAndSetObject method only in JDK8. The resulting code should still work fine as far back as Java 5.
atomic (1.1.5)https://rubygems.org/gems/atomic/versions/1.1.52013-04-06T16:25:28ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
= An atomic reference implementation for JRuby, Rubinius, and MRI.
== Changes since 1.1.4
* e269463 Fix #15 by explicitly testing for GCC's CAS.
* b8858f9 More formatting for description.
* a574b34 More formatting for description.
== Summary
This library provides:
* an Atomic class that guarantees atomic updates to its contained value
The Atomic class provides accessors for the contained "value" plus two update methods:
* update will run the provided block, passing the current value and replacing it with the block result iff the value has not been changed in the mean time. It may run the block repeatedly if there are other concurrent updates in progress.
* try_update will run the provided block, passing the current value and replacing it with the block result. If the value changes before the update can happen, it will throw Atomic::ConcurrentUpdateError.
The atomic repository is at http://github.com/headius/ruby-atomic.
== Usage
The simplest way to use "atomic" is to call the "update" or "try_update" methods.
"try_update" and "update" both call the given block, passing the current value and using the block's result as the new value. If the value is updated by another thread before the block completes, "try update" raises a ConcurrentUpdateError and "update" retries the block. Because "update" may call the block several times when multiple threads are all updating the same value, the block's logic should be kept as simple as possible.
require 'atomic'
my_atomic = Atomic.new(0)
my_atomic.update {|v| v + 1}
begin
my_atomic.try_update {|v| v + 1}
rescue Atomic::ConcurrentUpdateError => cue
# deal with it (retry, propagate, etc)
end
It's also possible to use the regular get/set operations on the Atomic, if you want to avoid the exception and respond to contended changes in some other way.
my_atomic = Atomic.new(0)
my_atomic.value # => 0
my_atomic.value = 1
my_atomic.swap(2) # => 1
my_atomic.compare_and_swap(2, 3) # => true, updated to 3
my_atomic.compare_and_swap(2, 3) # => false, current is not 2
== Building
As of 1.1.0, JDK8 is required to build the atomic gem, since it attempts to use the new atomic Unsafe.getAndSetObject method only in JDK8. The resulting code should still work fine as far back as Java 5.
atomic (1.1.5-java)https://rubygems.org/gems/atomic/versions/1.1.5-java2013-04-06T16:25:45ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
= An atomic reference implementation for JRuby, Rubinius, and MRI.
== Changes since 1.1.4
* e269463 Fix #15 by explicitly testing for GCC's CAS.
* b8858f9 More formatting for description.
* a574b34 More formatting for description.
== Summary
This library provides:
* an Atomic class that guarantees atomic updates to its contained value
The Atomic class provides accessors for the contained "value" plus two update methods:
* update will run the provided block, passing the current value and replacing it with the block result iff the value has not been changed in the mean time. It may run the block repeatedly if there are other concurrent updates in progress.
* try_update will run the provided block, passing the current value and replacing it with the block result. If the value changes before the update can happen, it will throw Atomic::ConcurrentUpdateError.
The atomic repository is at http://github.com/headius/ruby-atomic.
== Usage
The simplest way to use "atomic" is to call the "update" or "try_update" methods.
"try_update" and "update" both call the given block, passing the current value and using the block's result as the new value. If the value is updated by another thread before the block completes, "try update" raises a ConcurrentUpdateError and "update" retries the block. Because "update" may call the block several times when multiple threads are all updating the same value, the block's logic should be kept as simple as possible.
require 'atomic'
my_atomic = Atomic.new(0)
my_atomic.update {|v| v + 1}
begin
my_atomic.try_update {|v| v + 1}
rescue Atomic::ConcurrentUpdateError => cue
# deal with it (retry, propagate, etc)
end
It's also possible to use the regular get/set operations on the Atomic, if you want to avoid the exception and respond to contended changes in some other way.
my_atomic = Atomic.new(0)
my_atomic.value # => 0
my_atomic.value = 1
my_atomic.swap(2) # => 1
my_atomic.compare_and_swap(2, 3) # => true, updated to 3
my_atomic.compare_and_swap(2, 3) # => false, current is not 2
== Building
As of 1.1.0, JDK8 is required to build the atomic gem, since it attempts to use the new atomic Unsafe.getAndSetObject method only in JDK8. The resulting code should still work fine as far back as Java 5.
atomic (1.1.4-java)https://rubygems.org/gems/atomic/versions/1.1.4-java2013-04-06T16:18:26ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
= An atomic reference implementation for JRuby, Rubinius, and MRI.
== Changes since 1.1.0
* a574b34 More formatting for description.
* 58d3e34 Convert README to rdoc and try again.
* f519385 Attempting to get description to look nice on rubygems.org.
* 2c5ab6c Include README and oneline logs in gem description.
* 6aeb053 Add @funny-falcon to authors.
* aa24d4d Bump version to 1.1.1.
* dc327eb Merge pull request #16 from funny-falcon/patch-1
* 1b68767 Fix JRUBYREFERENCE8_ALLOCATOR
== Summary
This library provides:
* an Atomic class that guarantees atomic updates to its contained value
The Atomic class provides accessors for the contained "value" plus two update methods:
* update will run the provided block, passing the current value and replacing it with the block result iff the value has not been changed in the mean time. It may run the block repeatedly if there are other concurrent updates in progress.
* try_update will run the provided block, passing the current value and replacing it with the block result. If the value changes before the update can happen, it will throw Atomic::ConcurrentUpdateError.
The atomic repository is at http://github.com/headius/ruby-atomic.
== Usage
The simplest way to use "atomic" is to call the "update" or "try_update" methods.
"try_update" and "update" both call the given block, passing the current value and using the block's result as the new value. If the value is updated by another thread before the block completes, "try update" raises a ConcurrentUpdateError and "update" retries the block. Because "update" may call the block several times when multiple threads are all updating the same value, the block's logic should be kept as simple as possible.
require 'atomic'
my_atomic = Atomic.new(0)
my_atomic.update {|v| v + 1}
begin
my_atomic.try_update {|v| v + 1}
rescue Atomic::ConcurrentUpdateError => cue
# deal with it (retry, propagate, etc)
end
It's also possible to use the regular get/set operations on the Atomic, if you want to avoid the exception and respond to contended changes in some other way.
my_atomic = Atomic.new(0)
my_atomic.value # => 0
my_atomic.value = 1
my_atomic.swap(2) # => 1
my_atomic.compare_and_swap(2, 3) # => true, updated to 3
my_atomic.compare_and_swap(2, 3) # => false, current is not 2
== Building
As of 1.1.0, JDK8 is required to build the atomic gem, since it attempts to use the new atomic Unsafe.getAndSetObject method only in JDK8. The resulting code should still work fine as far back as Java 5.
atomic (1.1.4)https://rubygems.org/gems/atomic/versions/1.1.42013-04-05T20:01:46ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
= An atomic reference implementation for JRuby, Rubinius, and MRI.
== Changes since 1.1.0
* a574b34 More formatting for description.
* 58d3e34 Convert README to rdoc and try again.
* f519385 Attempting to get description to look nice on rubygems.org.
* 2c5ab6c Include README and oneline logs in gem description.
* 6aeb053 Add @funny-falcon to authors.
* aa24d4d Bump version to 1.1.1.
* dc327eb Merge pull request #16 from funny-falcon/patch-1
* 1b68767 Fix JRUBYREFERENCE8_ALLOCATOR
== Summary
This library provides:
* an Atomic class that guarantees atomic updates to its contained value
The Atomic class provides accessors for the contained "value" plus two update methods:
* update will run the provided block, passing the current value and replacing it with the block result iff the value has not been changed in the mean time. It may run the block repeatedly if there are other concurrent updates in progress.
* try_update will run the provided block, passing the current value and replacing it with the block result. If the value changes before the update can happen, it will throw Atomic::ConcurrentUpdateError.
The atomic repository is at http://github.com/headius/ruby-atomic.
== Usage
The simplest way to use "atomic" is to call the "update" or "try_update" methods.
"try_update" and "update" both call the given block, passing the current value and using the block's result as the new value. If the value is updated by another thread before the block completes, "try update" raises a ConcurrentUpdateError and "update" retries the block. Because "update" may call the block several times when multiple threads are all updating the same value, the block's logic should be kept as simple as possible.
require 'atomic'
my_atomic = Atomic.new(0)
my_atomic.update {|v| v + 1}
begin
my_atomic.try_update {|v| v + 1}
rescue Atomic::ConcurrentUpdateError => cue
# deal with it (retry, propagate, etc)
end
It's also possible to use the regular get/set operations on the Atomic, if you want to avoid the exception and respond to contended changes in some other way.
my_atomic = Atomic.new(0)
my_atomic.value # => 0
my_atomic.value = 1
my_atomic.swap(2) # => 1
my_atomic.compare_and_swap(2, 3) # => true, updated to 3
my_atomic.compare_and_swap(2, 3) # => false, current is not 2
== Building
As of 1.1.0, JDK8 is required to build the atomic gem, since it attempts to use the new atomic Unsafe.getAndSetObject method only in JDK8. The resulting code should still work fine as far back as Java 5.
atomic (1.1.3)https://rubygems.org/gems/atomic/versions/1.1.32013-04-05T19:41:33ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
= An atomic reference implementation for JRuby, Rubinius, and MRI.
== Changes since 1.1.0
58d3e34 Convert README to rdoc and try again.
f519385 Attempting to get description to look nice on rubygems.org.
2c5ab6c Include README and oneline logs in gem description.
6aeb053 Add @funny-falcon to authors.
aa24d4d Bump version to 1.1.1.
dc327eb Merge pull request #16 from funny-falcon/patch-1
1b68767 Fix JRUBYREFERENCE8_ALLOCATOR
= An atomic reference implementation for JRuby, Rubinius, and MRI.
== Summary
This library provides:
* an Atomic class that guarantees atomic updates to its contained value
The Atomic class provides accessors for the contained "value" plus two update
methods:
* update will run the provided block, passing the current value and replacing
it with the block result iff the value has not been changed in the mean time.
It may run the block repeatedly if there are other concurrent updates in
progress.
* try_update will run the provided block, passing the current value and
replacing it with the block result. If the value changes before the update
can happen, it will throw Atomic::ConcurrentUpdateError.
The atomic repository is at http://github.com/headius/ruby-atomic.
== Usage
The simplest way to use "atomic" is to call the "update" or "try_update"
methods.
"try_update" and "update" both call the given block, passing the current
value and using the block's result as the new value. If the value is updated
by another thread before the block completes, "try update" raises a
ConcurrentUpdateError and "update" retries the block. Because "update" may call
the block several times when multiple threads are all updating the same value,
the block's logic should be kept as simple as possible.
````ruby
require 'atomic'
my_atomic = Atomic.new(0)
my_atomic.update {|v| v + 1}
begin
my_atomic.try_update {|v| v + 1}
rescue Atomic::ConcurrentUpdateError => cue
# deal with it (retry, propagate, etc)
end
````
It's also possible to use the regular get/set operations on the Atomic, if you
want to avoid the exception and respond to contended changes in some other way.
````ruby
my_atomic = Atomic.new(0)
my_atomic.value # => 0
my_atomic.value = 1
my_atomic.swap(2) # => 1
my_atomic.compare_and_swap(2, 3) # => true, updated to 3
my_atomic.compare_and_swap(2, 3) # => false, current is not 2
````
== Building
As of 1.1.0, JDK8 is required to build the atomic gem, since it attempts to use
the new atomic Unsafe.getAndSetObject method only in JDK8. The resulting code
should still work fine as far back as Java 5.
atomic (1.1.2)https://rubygems.org/gems/atomic/versions/1.1.22013-04-05T19:19:51ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
Changes in version 1.1.2:
f519385 Attempting to get description to look nice on rubygems.org.
<p>atomic: An atomic reference implementation for JRuby, Rubinius, and MRI.</p>
<h1 id="summary">Summary</h1>
<p>This library provides:</p>
<ul>
<li>an Atomic class that guarantees atomic updates to its contained value</li>
</ul>
<p>The Atomic class provides accessors for the contained “value” plus two update
methods:</p>
<ul>
<li>update will run the provided block, passing the current value and replacing
it with the block result iff the value has not been changed in the mean time.
It may run the block repeatedly if there are other concurrent updates in
progress.</li>
<li>try_update will run the provided block, passing the current value and
replacing it with the block result. If the value changes before the update
can happen, it will throw Atomic::ConcurrentUpdateError.</li>
</ul>
<p>The atomic repository is at http://github.com/headius/ruby-atomic.</p>
<h1 id="usage">Usage</h1>
<p>The simplest way to use “atomic” is to call the “update” or “try_update”
methods.</p>
<p>“try_update” and “update” both call the given block, passing the current
value and using the block’s result as the new value. If the value is updated
by another thread before the block completes, “try update” raises a
ConcurrentUpdateError and “update” retries the block. Because “update” may call
the block several times when multiple threads are all updating the same value,
the block’s logic should be kept as simple as possible.</p>
<p>````ruby
require ‘atomic’</p>
<p>my_atomic = Atomic.new(0)
my_atomic.update {|v| v + 1}
begin
my_atomic.try_update {|v| v + 1}
rescue Atomic::ConcurrentUpdateError =&gt; cue
# deal with it (retry, propagate, etc)
end
````</p>
<p>It’s also possible to use the regular get/set operations on the Atomic, if you
want to avoid the exception and respond to contended changes in some other way.</p>
<p><code>ruby
my_atomic = Atomic.new(0)
my_atomic.value # =&gt; 0
my_atomic.value = 1
my_atomic.swap(2) # =&gt; 1
my_atomic.compare_and_swap(2, 3) # =&gt; true, updated to 3
my_atomic.compare_and_swap(2, 3) # =&gt; false, current is not 2
</code></p>
<h1 id="building">Building</h1>
<p>As of 1.1.0, JDK8 is required to build the atomic gem, since it attempts to use
the new atomic Unsafe.getAndSetObject method only in JDK8. The resulting code
should still work fine as far back as Java 5.</p>
atomic (1.1.2-java)https://rubygems.org/gems/atomic/versions/1.1.2-java2013-04-05T19:18:19ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
Changes in version 1.1.2:
<p>atomic: An atomic reference implementation for JRuby, Rubinius, and MRI.</p>
<h1 id="summary">Summary</h1>
<p>This library provides:</p>
<ul>
<li>an Atomic class that guarantees atomic updates to its contained value</li>
</ul>
<p>The Atomic class provides accessors for the contained “value” plus two update
methods:</p>
<ul>
<li>update will run the provided block, passing the current value and replacing
it with the block result iff the value has not been changed in the mean time.
It may run the block repeatedly if there are other concurrent updates in
progress.</li>
<li>try_update will run the provided block, passing the current value and
replacing it with the block result. If the value changes before the update
can happen, it will throw Atomic::ConcurrentUpdateError.</li>
</ul>
<p>The atomic repository is at http://github.com/headius/ruby-atomic.</p>
<h1 id="usage">Usage</h1>
<p>The simplest way to use “atomic” is to call the “update” or “try_update”
methods.</p>
<p>“try_update” and “update” both call the given block, passing the current
value and using the block’s result as the new value. If the value is updated
by another thread before the block completes, “try update” raises a
ConcurrentUpdateError and “update” retries the block. Because “update” may call
the block several times when multiple threads are all updating the same value,
the block’s logic should be kept as simple as possible.</p>
<p>````ruby
require ‘atomic’</p>
<p>my_atomic = Atomic.new(0)
my_atomic.update {|v| v + 1}
begin
my_atomic.try_update {|v| v + 1}
rescue Atomic::ConcurrentUpdateError =&gt; cue
# deal with it (retry, propagate, etc)
end
````</p>
<p>It’s also possible to use the regular get/set operations on the Atomic, if you
want to avoid the exception and respond to contended changes in some other way.</p>
<p><code>ruby
my_atomic = Atomic.new(0)
my_atomic.value # =&gt; 0
my_atomic.value = 1
my_atomic.swap(2) # =&gt; 1
my_atomic.compare_and_swap(2, 3) # =&gt; true, updated to 3
my_atomic.compare_and_swap(2, 3) # =&gt; false, current is not 2
</code></p>
<h1 id="building">Building</h1>
<p>As of 1.1.0, JDK8 is required to build the atomic gem, since it attempts to use
the new atomic Unsafe.getAndSetObject method only in JDK8. The resulting code
should still work fine as far back as Java 5.</p>
atomic (1.1.1)https://rubygems.org/gems/atomic/versions/1.1.12013-04-05T18:59:56ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
Changes in version 1.1.1:
2c5ab6c Include README and oneline logs in gem description.
6aeb053 Add @funny-falcon to authors.
aa24d4d Bump version to 1.1.1.
dc327eb Merge pull request #16 from funny-falcon/patch-1
1b68767 Fix JRUBYREFERENCE8_ALLOCATOR
atomic: An atomic reference implementation for JRuby, Rubinius, and MRI.
Summary
=======
This library provides:
* an Atomic class that guarantees atomic updates to its contained value
The Atomic class provides accessors for the contained "value" plus two update
methods:
* update will run the provided block, passing the current value and replacing
it with the block result iff the value has not been changed in the mean time.
It may run the block repeatedly if there are other concurrent updates in
progress.
* try_update will run the provided block, passing the current value and
replacing it with the block result. If the value changes before the update
can happen, it will throw Atomic::ConcurrentUpdateError.
The atomic repository is at http://github.com/headius/ruby-atomic.
Usage
=====
The simplest way to use "atomic" is to call the "update" or "try_update"
methods.
"try_update" and "update" both call the given block, passing the current
value and using the block's result as the new value. If the value is updated
by another thread before the block completes, "try update" raises a
ConcurrentUpdateError and "update" retries the block. Because "update" may call
the block several times when multiple threads are all updating the same value,
the block's logic should be kept as simple as possible.
````ruby
require 'atomic'
my_atomic = Atomic.new(0)
my_atomic.update {|v| v + 1}
begin
my_atomic.try_update {|v| v + 1}
rescue Atomic::ConcurrentUpdateError => cue
# deal with it (retry, propagate, etc)
end
````
It's also possible to use the regular get/set operations on the Atomic, if you
want to avoid the exception and respond to contended changes in some other way.
````ruby
my_atomic = Atomic.new(0)
my_atomic.value # => 0
my_atomic.value = 1
my_atomic.swap(2) # => 1
my_atomic.compare_and_swap(2, 3) # => true, updated to 3
my_atomic.compare_and_swap(2, 3) # => false, current is not 2
````
Building
========
As of 1.1.0, JDK8 is required to build the atomic gem, since it attempts to use
the new atomic Unsafe.getAndSetObject method only in JDK8. The resulting code
should still work fine as far back as Java 5.
atomic (1.1.1-java)https://rubygems.org/gems/atomic/versions/1.1.1-java2013-04-05T18:59:35ZCharles Oliver Nutter, MenTaLguY, Sokolov YuraAn atomic reference implementation for JRuby, Rubinius, and MRI
Changes in version 1.1.1:
2c5ab6c Include README and oneline logs in gem description.
6aeb053 Add @funny-falcon to authors.
aa24d4d Bump version to 1.1.1.
dc327eb Merge pull request #16 from funny-falcon/patch-1
1b68767 Fix JRUBYREFERENCE8_ALLOCATOR
atomic: An atomic reference implementation for JRuby, Rubinius, and MRI.
Summary
=======
This library provides:
* an Atomic class that guarantees atomic updates to its contained value
The Atomic class provides accessors for the contained "value" plus two update
methods:
* update will run the provided block, passing the current value and replacing
it with the block result iff the value has not been changed in the mean time.
It may run the block repeatedly if there are other concurrent updates in
progress.
* try_update will run the provided block, passing the current value and
replacing it with the block result. If the value changes before the update
can happen, it will throw Atomic::ConcurrentUpdateError.
The atomic repository is at http://github.com/headius/ruby-atomic.
Usage
=====
The simplest way to use "atomic" is to call the "update" or "try_update"
methods.
"try_update" and "update" both call the given block, passing the current
value and using the block's result as the new value. If the value is updated
by another thread before the block completes, "try update" raises a
ConcurrentUpdateError and "update" retries the block. Because "update" may call
the block several times when multiple threads are all updating the same value,
the block's logic should be kept as simple as possible.
````ruby
require 'atomic'
my_atomic = Atomic.new(0)
my_atomic.update {|v| v + 1}
begin
my_atomic.try_update {|v| v + 1}
rescue Atomic::ConcurrentUpdateError => cue
# deal with it (retry, propagate, etc)
end
````
It's also possible to use the regular get/set operations on the Atomic, if you
want to avoid the exception and respond to contended changes in some other way.
````ruby
my_atomic = Atomic.new(0)
my_atomic.value # => 0
my_atomic.value = 1
my_atomic.swap(2) # => 1
my_atomic.compare_and_swap(2, 3) # => true, updated to 3
my_atomic.compare_and_swap(2, 3) # => false, current is not 2
````
Building
========
As of 1.1.0, JDK8 is required to build the atomic gem, since it attempts to use
the new atomic Unsafe.getAndSetObject method only in JDK8. The resulting code
should still work fine as far back as Java 5.
atomic (1.1.0)https://rubygems.org/gems/atomic/versions/1.1.02013-04-04T10:34:01ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.1.0-java)https://rubygems.org/gems/atomic/versions/1.1.0-java2013-04-04T10:34:26ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.0.2-java)https://rubygems.org/gems/atomic/versions/1.0.2-java2013-03-29T06:56:54ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.0.2)https://rubygems.org/gems/atomic/versions/1.0.22013-03-29T06:56:46ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.0.1-java)https://rubygems.org/gems/atomic/versions/1.0.1-java2012-04-26T20:36:23ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.0.1)https://rubygems.org/gems/atomic/versions/1.0.12012-04-26T20:36:31ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.0.0)https://rubygems.org/gems/atomic/versions/1.0.02012-02-02T05:05:41ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (1.0.0-java)https://rubygems.org/gems/atomic/versions/1.0.0-java2012-02-02T05:05:52ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (0.0.9-java)https://rubygems.org/gems/atomic/versions/0.0.9-java2011-12-03T18:01:16ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (0.0.9)https://rubygems.org/gems/atomic/versions/0.0.92011-12-03T18:01:29ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (0.0.8-java)https://rubygems.org/gems/atomic/versions/0.0.8-java2011-11-30T00:56:51ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (0.0.8)https://rubygems.org/gems/atomic/versions/0.0.82011-11-30T00:57:00ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby, Rubinius, and MRI
An atomic reference implementation for JRuby, Rubinius, and MRI atomic (0.0.7-java)https://rubygems.org/gems/atomic/versions/0.0.7-java2011-11-29T04:51:20ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby and green or GIL-threaded impls
An atomic reference implementation for JRuby and green or GIL-threaded impls atomic (0.0.7)https://rubygems.org/gems/atomic/versions/0.0.72011-11-29T04:51:14ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby and green or GIL-threaded impls
An atomic reference implementation for JRuby and green or GIL-threaded impls atomic (0.0.6-java)https://rubygems.org/gems/atomic/versions/0.0.6-java2011-09-06T16:29:23ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby and green or GIL-threaded impls
An atomic reference implementation for JRuby and green or GIL-threaded impls atomic (0.0.6)https://rubygems.org/gems/atomic/versions/0.0.62011-09-06T16:29:43ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby and green or GIL-threaded impls
An atomic reference implementation for JRuby and green or GIL-threaded impls atomic (0.0.5)https://rubygems.org/gems/atomic/versions/0.0.52011-07-05T18:29:43ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby and green or GIL-threaded impls
An atomic reference implementation for JRuby and green or GIL-threaded impls atomic (0.0.4)https://rubygems.org/gems/atomic/versions/0.0.42011-03-10T23:57:33ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby and green or GIL-threaded impls
An atomic reference implementation for JRuby and green or GIL-threaded impls atomic (0.0.3)https://rubygems.org/gems/atomic/versions/0.0.32010-06-08T12:05:00ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby and green or GIL-threaded impls
An atomic reference implementation for JRuby and green or GIL-threaded impls atomic (0.0.2)https://rubygems.org/gems/atomic/versions/0.0.22010-06-08T04:29:32ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby and green or GIL-threaded impls
An atomic reference implementation for JRuby and green or GIL-threaded impls atomic (0.0.1)https://rubygems.org/gems/atomic/versions/0.0.12010-06-08T04:04:48ZCharles Oliver Nutter, MenTaLguYAn atomic reference implementation for JRuby and green or GIL-threaded impls
An atomic reference implementation for JRuby and green or GIL-threaded impls