Skip to content

Commit 48ff0e2

Browse files
author
Petr Chalupa
authored
Merge pull request #632 from pitr-ch/master
preparing 1.0.5
2 parents 467f3e4 + d4ca5b6 commit 48ff0e2

36 files changed

+948
-404
lines changed

.travis.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,17 @@ matrix:
3434
- rvm: 2.3.1
3535
jdk: oraclejdk8
3636
env: COVERAGE=1
37-
- rvm: jruby-head
38-
jdk: oraclejdk8
39-
env: TRUFFLE=1
4037
allow_failures:
4138
- rvm: ruby-head
4239
- rvm: jruby-head
4340
- rvm: 1.9.3
4441
- rvm: rbx
45-
- rvm: jruby-head
46-
jdk: oraclejdk8
47-
env: TRUFFLE=1
4842

4943
env:
5044
global:
5145
- JAVA_OPTS=-Xmx1024m
5246

5347
before_install:
54-
- "echo $JAVA_OPTS"
55-
- bundle update # temporary fix, not sure why it helps
48+
- "echo JAVA_OPTS: $JAVA_OPTS"
5649

57-
script: if [[ -v TRUFFLE ]]; then support/test-truffle.sh; else RUBYOPT=-w bundle exec rake ci; fi
50+
script: RUBYOPT=-w bundle exec rake ci

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
## Current Release v1.0.4 (27 Dec 2016)
1+
## Release v1.0.5, edge v0.3.1 (1 Feb 2017)
2+
3+
concurrent-ruby:
4+
5+
* Documentation for Event and Semaphore
6+
* Use Unsafe#fullFence and #loadFence directly since the shortcuts were removed in JRuby
7+
* Do not depend on org.jruby.util.unsafe.UnsafeHolder
8+
9+
concurrent-ruby-edge:
10+
11+
* (#620) Actors on Pool raise an error
12+
* (#624) Delayed promises did not interact correctly with flatting
13+
* Fix arguments yielded by callback methods
14+
* Overridable default executor in promises factory methods
15+
* Asking actor to terminate will always resolve to `true`
16+
17+
## Release v1.0.4, edge v0.3.0 (27 Dec 2016)
218

319
concurrent-ruby:
420

Gemfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
source 'https://rubygems.org'
22

3-
gemspec name: 'concurrent-ruby'
4-
gemspec name: 'concurrent-ruby-edge'
3+
gem 'concurrent-ruby', path: '.'
4+
gem 'concurrent-ruby-edge', path: '.'
5+
gem 'concurrent-ruby-ext', path: '.', platform: :mri
56

67
group :development do
7-
gem 'rake', '~> 10.0'
8+
gem 'rake', '~> 11.0'
89
gem 'rake-compiler', '~> 0.9.5'
910
gem 'rake-compiler-dock', '~> 0.4.3'
1011
gem 'gem-compiler', '~> 0.3.0'
@@ -13,11 +14,9 @@ group :development do
1314
# documentation
1415
gem 'countloc', '~> 0.4.0', :platforms => :mri, :require => false
1516
gem 'yard', '~> 0.8.0', :require => false
16-
# TODO (pitr-ch 15-Oct-2016): does not work on 1.9.3 anymore
17-
# TODO remove, reports private classes as undocumented
18-
gem 'inch', '~> 0.7.0', :platforms => :mri, :require => false
1917
gem 'redcarpet', '~> 3.3', platforms: :mri # understands github markdown
2018
gem 'md-ruby-eval'
19+
gem 'pry' # needed by md-ruby-eval
2120
end
2221

2322
group :testing do

doc/actor/define.out.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ def on_event(event)
3333
an_actor << :boo << Message.new(:add, 1)
3434
an_actor.ask!(Message.new(:value, nil)) # => 1
3535
an_actor << :terminate!
36-
# => #<Concurrent::Actor::Reference:0x7ff3ab16edc8 /an_actor (AnActor)>
36+
# => #<Concurrent::Actor::Reference:0x7fbedc137688 /an_actor (AnActor)>
3737

doc/actor/io.out.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def default_executor
1616
end
1717

1818
actor_doing_io = ActorDoingIO.spawn :actor_doing_io
19-
# => #<Concurrent::Actor::Reference:0x7ff3ab176b40 /actor_doing_io (ActorDoingIO)>
19+
# => #<Concurrent::Actor::Reference:0x7fbedc146e80 /actor_doing_io (ActorDoingIO)>
2020
actor_doing_io.executor == Concurrent.global_io_executor
2121
# => true
2222

@@ -37,10 +37,10 @@ def default_executor
3737
pool = Concurrent::Actor::Utils::Pool.spawn('pool', 2) do |index|
3838
IOWorker.spawn(name: "worker-#{index}")
3939
end
40-
# => #<Concurrent::Actor::Reference:0x7ff3abaac5c0 /pool (Concurrent::Actor::Utils::Pool)>
40+
# => #<Concurrent::Actor::Reference:0x7fbedba83378 /pool (Concurrent::Actor::Utils::Pool)>
4141

4242
pool << 1 << 2 << 3 << 4 << 5 << 6
43-
# => #<Concurrent::Actor::Reference:0x7ff3abaac5c0 /pool (Concurrent::Actor::Utils::Pool)>
43+
# => #<Concurrent::Actor::Reference:0x7fbedba83378 /pool (Concurrent::Actor::Utils::Pool)>
4444

4545
# prints two lines each second
4646
# /pool/worker-0 second:1414677666 message:1

doc/actor/messaging.out.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ def on_message(message)
2424
end
2525

2626
calculator = Calculator.spawn('calculator')
27-
# => #<Concurrent::Actor::Reference:0x7ff3ab0c4f80 /calculator (Calculator)>
27+
# => #<Concurrent::Actor::Reference:0x7fbedba52d90 /calculator (Calculator)>
2828
addition = calculator.ask Add[1, 2]
29-
# => <#Concurrent::Edge::Future:0x7ff3ab08e188 pending blocks:[]>
29+
# => <#Concurrent::Promises::Future:0x7fbedc05f7b0 pending>
3030
substraction = calculator.ask Subtract[1, 0.5]
31-
# => <#Concurrent::Edge::Future:0x7ff3ab9de940 pending blocks:[]>
31+
# => <#Concurrent::Promises::Future:0x7fbedd891388 pending>
3232
results = (addition & substraction)
33-
# => <#Concurrent::Edge::Future:0x7ff3aa0b1b48 pending blocks:[]>
33+
# => <#Concurrent::Promises::Future:0x7fbedc04eeb0 pending>
3434
results.value! # => [3, 0.5]
3535

3636
calculator.ask! :terminate! # => true

doc/actor/quick.out.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,18 @@ def on_message(message)
1717
# `link: true` makes the actor linked to root actor and supervised
1818
# which is default behavior
1919
adder = Adder.spawn(name: :adder, link: true, args: [1])
20-
# => #<Concurrent::Actor::Reference:0x7ff3ababf828 /adder (Adder)>
20+
# => #<Concurrent::Actor::Reference:0x7fbedd8e3d40 /adder (Adder)>
2121
adder.parent
22-
# => #<Concurrent::Actor::Reference:0x7ff3abad7ba8 / (Concurrent::Actor::Root)>
22+
# => #<Concurrent::Actor::Reference:0x7fbedbaa1e90 / (Concurrent::Actor::Root)>
2323

2424
# tell and forget
2525
adder.tell(:add).tell(:add)
26-
# => #<Concurrent::Actor::Reference:0x7ff3ababf828 /adder (Adder)>
26+
# => #<Concurrent::Actor::Reference:0x7fbedd8e3d40 /adder (Adder)>
2727
# ask to get result
2828
adder.ask!(:add) # => 4
2929
# fail the actor
30-
adder.ask!(:bad) rescue $! # => #<Concurrent::Actor::UnknownMessage: :bad>
30+
adder.ask!(:bad) rescue $!
31+
# => #<Concurrent::Actor::UnknownMessage: :bad from #<Thread:0x007fbedb8809b8>>
3132
# actor is restarted with initial values
3233
adder.ask!(:add) # => 2
3334
adder.ask!(:terminate!) # => true

doc/actor/supervision_tree.out.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,26 +48,26 @@ def on_message(msg)
4848
end
4949

5050
master = Master.spawn(name: 'master', supervise: true)
51-
# => #<Concurrent::Actor::Reference:0x7fa595899fa8 /master (Master)>
51+
# => #<Concurrent::Actor::Reference:0x7fbedc05e5e0 /master (Master)>
5252
listener = master.ask!(:listener)
53-
# => #<Concurrent::Actor::Reference:0x7fa5958909d0 /master/listener1 (Listener)>
54-
listener.ask!(:number) # => 12
53+
# => #<Concurrent::Actor::Reference:0x7fbedd86b840 /master/listener1 (Listener)>
54+
listener.ask!(:number) # => 39
5555
# crash the listener which is supervised by master, it's restarted automatically reporting a different number
5656
listener.tell(:crash)
57-
# => #<Concurrent::Actor::Reference:0x7fa5958909d0 /master/listener1 (Listener)>
58-
listener.ask!(:number) # => 65
57+
# => #<Concurrent::Actor::Reference:0x7fbedd86b840 /master/listener1 (Listener)>
58+
listener.ask!(:number) # => 73
5959

6060
master << :crash
61-
# => #<Concurrent::Actor::Reference:0x7fa595899fa8 /master (Master)>
61+
# => #<Concurrent::Actor::Reference:0x7fbedc05e5e0 /master (Master)>
6262

6363
sleep 0.1 # => 0
6464

6565
# ask for listener again, old one is terminated with master and replaced with new one
6666
listener.ask!(:terminated?) # => true
6767
listener = master.ask!(:listener)
68-
# => #<Concurrent::Actor::Reference:0x7fa5970d5608 /master/listener1 (Listener)>
69-
listener.ask!(:number) # => 77
68+
# => #<Concurrent::Actor::Reference:0x7fbedb929090 /master/listener1 (Listener)>
69+
listener.ask!(:number) # => 72
7070

71-
master.ask!(:terminate!) # => [[true], true]
71+
master.ask!(:terminate!) # => true
7272

7373
sleep 0.1 # => 0

0 commit comments

Comments
 (0)