atomic 1.1.12-java → 1.1.13-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/atomic.gemspec +1 -1
- data/ext/org/jruby/ext/atomic/AtomicReferenceLibrary.java +18 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f2c0634bf6442595a541522417e15121d44cefa
|
4
|
+
data.tar.gz: cb6473373861208ca4aede4c7ec9bd9884caca5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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-
|
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:
|