Skip to content

Commit eca4cc0

Browse files
authored
Merge pull request #700 from ruby-concurrency/pitr-ch/ci
Fixing CI
2 parents 44ad0e5 + fcd5886 commit eca4cc0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+958
-957
lines changed

Gemfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ gem 'concurrent-ruby-ext', path: '.', platform: :mri
66

77
group :development do
88
gem 'rake', '~> 11.0'
9-
gem 'rake-compiler', '~> 0.9.5'
10-
gem 'rake-compiler-dock', '~> 0.4.3'
9+
gem 'rake-compiler', '~> 1.0.0'
10+
gem 'rake-compiler-dock', '~> 0.6.0'
1111
gem 'gem-compiler', '~> 0.3.0'
1212
gem 'benchmark-ips', '~> 2.7'
1313

1414
# documentation
1515
gem 'countloc', '~> 0.4.0', :platforms => :mri, :require => false
16+
# TODO (pitr-ch 04-May-2018): update to remove: [DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
1617
gem 'yard', '~> 0.8.0', :require => false
1718
gem 'redcarpet', '~> 3.3', platforms: :mri # understands github markdown
1819
gem 'md-ruby-eval'

Rakefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,7 @@ begin
181181
--backtrace
182182
--seed 1
183183
--format documentation
184-
--tag ~unfinished
185-
--tag ~notravis
186-
--tag ~buggy ]
184+
--tag ~notravis ]
187185

188186
RSpec::Core::RakeTask.new(:travis) do |t|
189187
t.rspec_opts = ['--color', *options].join(' ')

ext/ConcurrentRubyExtService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import org.jruby.Ruby;
44
import org.jruby.runtime.load.BasicLibraryService;
5-
import com.concurrent_ruby.ext.JRubyMapBackendLibrary;
65

76
public class ConcurrentRubyExtService implements BasicLibraryService {
87
public boolean basicLoad(final Ruby runtime) throws IOException {

lib/concurrent/actor.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,13 @@ def self.current
3535
end
3636

3737
@root = Concurrent::Promises.delay do
38-
Core.new(parent: nil, name: '/', class: Root, initialized: future = Concurrent::Promises.resolvable_future).reference.tap do
39-
future.wait!
40-
end
38+
Core.
39+
new(parent: nil,
40+
name: '/',
41+
class: Root,
42+
initialized: future = Concurrent::Promises.resolvable_future).
43+
reference.
44+
tap { future.wait! }
4145
end
4246

4347
# A root actor, a default parent of all actors spawned outside an actor

lib/concurrent/actor/behaviour.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module Actor
4949
# - {RestartingContext} uses
5050
# {include:Actor::Behaviour.restarting_behaviour_definition}
5151
module Behaviour
52-
MESSAGE_PROCESSED = Object.new
52+
MESSAGE_PROCESSED = ::Object.new
5353

5454
require 'concurrent/actor/behaviour/abstract'
5555
require 'concurrent/actor/behaviour/awaits'

lib/concurrent/actor/core.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,9 @@ def remove_child(child)
9090
# can be called from other alternative Reference implementations
9191
# @param [Envelope] envelope
9292
def on_envelope(envelope)
93+
log(DEBUG) { "is #{envelope.future ? 'asked' : 'told'} #{envelope.message.inspect} by #{envelope.sender}" }
9394
schedule_execution do
94-
log(DEBUG) { "was #{envelope.future ? 'asked' : 'told'} #{envelope.message.inspect} by #{envelope.sender}" }
95+
log(DEBUG) { "was #{envelope.future ? 'asked' : 'told'} #{envelope.message.inspect} by #{envelope.sender} - processing" }
9596
process_envelope envelope
9697
end
9798
nil

lib/concurrent/agent.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class Agent < Synchronization::LockableObject
147147
ERROR_MODES = [:continue, :fail].freeze
148148
private_constant :ERROR_MODES
149149

150-
AWAIT_FLAG = Object.new
150+
AWAIT_FLAG = ::Object.new
151151
private_constant :AWAIT_FLAG
152152

153153
AWAIT_ACTION = ->(value, latch) { latch.count_down; AWAIT_FLAG }

lib/concurrent/async.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ def await
435435
#
436436
# @!visibility private
437437
def init_synchronization
438-
return self if @__async_initialized__
438+
return self if defined?(@__async_initialized__) && @__async_initialized__
439439
@__async_initialized__ = true
440440
@__async_delegator__ = AsyncDelegator.new(self)
441441
@__await_delegator__ = AwaitDelegator.new(@__async_delegator__)

lib/concurrent/atomic/count_down_latch.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module Concurrent
5555
# @!macro internal_implementation_note
5656
CountDownLatchImplementation = case
5757
when Concurrent.on_jruby?
58-
JavaCountDownLatch
58+
MutexCountDownLatch
5959
else
6060
MutexCountDownLatch
6161
end

lib/concurrent/atomic/read_write_lock.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ def acquire_write_lock
193193
#
194194
# @return [Boolean] true if the lock is successfully released
195195
def release_write_lock
196-
c = @Counter.update { |counter| counter-RUNNING_WRITER }
196+
return true unless running_writer?
197+
c = @Counter.update { |counter| counter - RUNNING_WRITER }
197198
@ReadLock.broadcast
198199
@WriteLock.signal if waiting_writers(c) > 0
199200
true

0 commit comments

Comments
 (0)