concurrent-ruby 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +2 -2
- data/Rakefile +21 -5
- data/lib/concurrent/concurrent_ruby.jar +0 -0
- data/lib/concurrent/executor/java_executor_service.rb +1 -10
- data/lib/concurrent/synchronization/abstract_struct.rb +1 -1
- data/lib/concurrent/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: baa8a50b8b08ea03ec40438bf1e921d86a28c2ccc1292535bf9d72aab66fb659
|
4
|
+
data.tar.gz: cf77c2327c6527a2be4476c2e6464c2b90e86610ecf3543bcee5df5e2c6aa3b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9a34a06cc1efb94d36d986369efefb8df61bfe1bd4b0bf960ab84028bf68e6a60636fcaa453490b38c5ced3d8b628e62f92e2524dd08ac1912ccbb74ba40aeb
|
7
|
+
data.tar.gz: 51790fe6686917f9a11e5e8fc82af16959bdc7ef8111348bfaad010ad1babc97cfde0048407f98cf11002e789a53e5eddff65a58977f87c4825fab06d4a20a11
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
## Current
|
2
2
|
|
3
|
+
## Release v1.1.4 (14 Dec 2018)
|
4
|
+
|
5
|
+
* (#780) Remove java_alias of 'submit' method of Runnable to let executor service work on java 11
|
6
|
+
* (#776) Fix NameError on defining a struct with a name which is already taken in an ancestor
|
7
|
+
|
3
8
|
## Release v1.1.3 (7 Nov 2018)
|
4
9
|
|
5
10
|
* (#775) fix partial require of the gem (although not officially supported)
|
data/README.md
CHANGED
@@ -43,7 +43,7 @@ appreciate your help. Would you like to contribute? Great! Have a look at
|
|
43
43
|
|
44
44
|
*Concurrent Ruby makes one of the strongest thread safety guarantees of any Ruby concurrency
|
45
45
|
library, providing consistent behavior and guarantees on all three of the main Ruby interpreters
|
46
|
-
(MRI/CRuby, JRuby,
|
46
|
+
(MRI/CRuby, JRuby, Rubinius, TruffleRuby).*
|
47
47
|
|
48
48
|
Every abstraction in this library is thread safe. Specific thread safety guarantees are documented
|
49
49
|
with each abstraction.
|
@@ -59,7 +59,7 @@ Concurrent Ruby is also the only Ruby library which provides a full suite of thr
|
|
59
59
|
immutable variable types and data structures.
|
60
60
|
|
61
61
|
We've also initiated discussion to document [memory model](docs-source/synchronization.md) of Ruby which
|
62
|
-
would provide consistent behaviour and guarantees on all
|
62
|
+
would provide consistent behaviour and guarantees on all four of the main Ruby interpreters
|
63
63
|
(MRI/CRuby, JRuby, Rubinius, TruffleRuby).
|
64
64
|
|
65
65
|
## Features & Documentation
|
data/Rakefile
CHANGED
@@ -18,11 +18,10 @@ edge_gemspec = Gem::Specification.load File.join(__dir__, 'concurrent-ruby-edge.
|
|
18
18
|
|
19
19
|
require 'rake/javaextensiontask'
|
20
20
|
|
21
|
-
JRUBY_JAR_PATH = '/usr/local/opt/rbenv/versions/jruby-9.1.17.0/lib/jruby.jar'
|
22
|
-
|
23
21
|
class ConcurrentRubyJavaExtensionTask < Rake::JavaExtensionTask
|
24
22
|
def java_classpath_arg(*args)
|
25
23
|
jruby_cpath = nil
|
24
|
+
|
26
25
|
if RUBY_PLATFORM =~ /java/
|
27
26
|
begin
|
28
27
|
cpath = Java::java.lang.System.getProperty('java.class.path').split(File::PATH_SEPARATOR)
|
@@ -30,11 +29,26 @@ class ConcurrentRubyJavaExtensionTask < Rake::JavaExtensionTask
|
|
30
29
|
jruby_cpath = cpath.compact.join(File::PATH_SEPARATOR)
|
31
30
|
rescue => e
|
32
31
|
end
|
32
|
+
|
33
|
+
unless jruby_cpath
|
34
|
+
libdir = RbConfig::CONFIG['libdir']
|
35
|
+
if libdir.start_with? "classpath:"
|
36
|
+
raise 'Cannot build with jruby-complete'
|
37
|
+
end
|
38
|
+
jruby_cpath = File.join(libdir, "jruby.jar")
|
39
|
+
end
|
33
40
|
end
|
41
|
+
|
34
42
|
unless jruby_cpath
|
35
|
-
|
36
|
-
|
43
|
+
jruby_home = ENV['JRUBY_HOME']
|
44
|
+
if jruby_home
|
45
|
+
candidate = File.join(jruby_home, 'lib', 'jruby.jar')
|
46
|
+
jruby_cpath = candidate if File.exist? candidate
|
47
|
+
end
|
37
48
|
end
|
49
|
+
|
50
|
+
raise "jruby.jar path not found" unless jruby_cpath
|
51
|
+
|
38
52
|
jruby_cpath += File::PATH_SEPARATOR + args.join(File::PATH_SEPARATOR) unless args.empty?
|
39
53
|
jruby_cpath ? "-cp \"#{jruby_cpath}\"" : ""
|
40
54
|
end
|
@@ -63,7 +77,9 @@ namespace :repackage do
|
|
63
77
|
desc '* with Windows fat distributions'
|
64
78
|
task :all do
|
65
79
|
Dir.chdir(__dir__) do
|
80
|
+
# store gems in vendor cache for docker
|
66
81
|
sh 'bundle package'
|
82
|
+
|
67
83
|
# needed only if the jar is built outside of docker
|
68
84
|
Rake::Task['lib/concurrent/concurrent_ruby.jar'].invoke
|
69
85
|
RakeCompilerDock.exec 'support/cross_building.sh'
|
@@ -119,7 +135,7 @@ rescue LoadError => e
|
|
119
135
|
puts 'RSpec is not installed, skipping test task definitions: ' + e.message
|
120
136
|
end
|
121
137
|
|
122
|
-
current_yard_version_name = Concurrent::VERSION.split('.')[0..
|
138
|
+
current_yard_version_name = [*Concurrent::VERSION.split('.')[0..1], 'x'].join('.')
|
123
139
|
|
124
140
|
begin
|
125
141
|
require 'yard'
|
Binary file
|
@@ -20,13 +20,12 @@ if Concurrent.on_jruby?
|
|
20
20
|
|
21
21
|
def initialize(*args, &block)
|
22
22
|
super
|
23
|
-
ns_make_executor_runnable
|
24
23
|
end
|
25
24
|
|
26
25
|
def post(*args, &task)
|
27
26
|
raise ArgumentError.new('no block given') unless block_given?
|
28
27
|
return handle_fallback(*args, &task) unless running?
|
29
|
-
@executor.
|
28
|
+
@executor.submit Job.new(args, task)
|
30
29
|
true
|
31
30
|
rescue Java::JavaUtilConcurrent::RejectedExecutionException
|
32
31
|
raise RejectedExecutionError
|
@@ -75,14 +74,6 @@ if Concurrent.on_jruby?
|
|
75
74
|
@executor.isShutdown || @executor.isTerminated
|
76
75
|
end
|
77
76
|
|
78
|
-
def ns_make_executor_runnable
|
79
|
-
if !defined?(@executor.submit_runnable)
|
80
|
-
@executor.class.class_eval do
|
81
|
-
java_alias :submit_runnable, :submit, [java.lang.Runnable.java_class]
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
77
|
class Job
|
87
78
|
include Runnable
|
88
79
|
def initialize(args, block)
|
@@ -138,7 +138,7 @@ module Concurrent
|
|
138
138
|
end
|
139
139
|
unless name.nil?
|
140
140
|
begin
|
141
|
-
parent.send :remove_const, name if parent.const_defined?
|
141
|
+
parent.send :remove_const, name if parent.const_defined?(name, false)
|
142
142
|
parent.const_set(name, clazz)
|
143
143
|
clazz
|
144
144
|
rescue NameError
|
data/lib/concurrent/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: concurrent-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jerry D'Antonio
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-12-15 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: |
|
16
16
|
Modern concurrency tools including agents, futures, promises, thread pools, actors, supervisors, and more.
|