atomic 1.1.12-java → 1.1.13-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e3f0a5d07089c2cc1dcbffb5a5165c0596381e6d
4
- data.tar.gz: a8eec695153f513b008af7424974fd568dc9308a
3
+ metadata.gz: 4f2c0634bf6442595a541522417e15121d44cefa
4
+ data.tar.gz: cb6473373861208ca4aede4c7ec9bd9884caca5f
5
5
  SHA512:
6
- metadata.gz: add1d6a28f93fa3efc44afe9a2ec542b7e624005d791c6b99577fc582ae9cd883762d54c2967cf8a7d12aace9d36faa6f158f8dd1f38f52b6a47c8a0f9ee11d7
7
- data.tar.gz: 40f6ffc91ace5540b6bb408f1f588579de4b23a1936ff5b4aa659f355edafb7e347ae919a1a2df79d00875039808db167a8e770c9d7073787cb0c3672e04d875
6
+ metadata.gz: 2824ac3b2d05fa07238e4e3c074e6d61827d2a89db6671b55d8cd03ae5e17b2cdbbe99a4ed8e3c16c465eb1d824dee8085de5af2ecd046cd78628981d6e0e396
7
+ data.tar.gz: 75e953b579c36bebb85907aa0229abff9ee8067cce73a1c8db57a769212166e851b1605d43e9831b97f680f18958743ae552d3b9359d2c8209598c4f39c66a05
data/atomic.gemspec CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = %q{atomic}
7
- s.version = "1.1.12"
7
+ s.version = "1.1.13"
8
8
  s.authors = ["Charles Oliver Nutter", "MenTaLguY", "Sokolov Yura"]
9
9
  s.date = Time.now.strftime('%Y-%m-%d')
10
10
  s.summary = "An atomic reference implementation for JRuby, Rubinius, and MRI"
@@ -12,6 +12,7 @@
12
12
 
13
13
  package org.jruby.ext.atomic;
14
14
 
15
+ import java.lang.reflect.Field;
15
16
  import java.io.IOException;
16
17
  import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
17
18
  import org.jruby.Ruby;
@@ -25,7 +26,6 @@ import org.jruby.runtime.ObjectAllocator;
25
26
  import org.jruby.runtime.ThreadContext;
26
27
  import org.jruby.runtime.builtin.IRubyObject;
27
28
  import org.jruby.runtime.load.Library;
28
- import org.jruby.util.unsafe.UnsafeHolder;
29
29
 
30
30
  /**
31
31
  * This library adds an atomic reference type to JRuby for use in the atomic
@@ -154,6 +154,23 @@ public class AtomicReferenceLibrary implements Library {
154
154
  }
155
155
  }
156
156
  }
157
+
158
+ private static final class UnsafeHolder {
159
+ private UnsafeHolder(){}
160
+
161
+ public static final sun.misc.Unsafe U = loadUnsafe();
162
+
163
+ private static sun.misc.Unsafe loadUnsafe() {
164
+ try {
165
+ Class unsafeClass = Class.forName("sun.misc.Unsafe");
166
+ Field f = unsafeClass.getDeclaredField("theUnsafe");
167
+ f.setAccessible(true);
168
+ return (sun.misc.Unsafe) f.get(null);
169
+ } catch (Exception e) {
170
+ return null;
171
+ }
172
+ }
173
+ }
157
174
 
158
175
  public static class JRubyReference8 extends JRubyReference {
159
176
  public JRubyReference8(Ruby runtime, RubyClass klass) {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atomic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.12
4
+ version: 1.1.13
5
5
  platform: java
6
6
  authors:
7
7
  - Charles Oliver Nutter
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-08-02 00:00:00.000000000 Z
13
+ date: 2013-08-14 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: An atomic reference implementation for JRuby, Rubinius, and MRI
16
16
  email: