Skip to content

Commit b97cfcf

Browse files
committed
Change-log updates
1 parent 02a2e88 commit b97cfcf

File tree

3 files changed

+44
-3
lines changed

3 files changed

+44
-3
lines changed

CHANGELOG.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* Added `at_exit` handler to Ruby thread pools (already in Java thread pools)
2121
- Ruby handler stores the object id and retrieves from `ObjectSpace`
2222
- JRuby disables `ObjectSpace` by default so that handler stores the object reference
23-
* Added a `:stop_on_exit` option to thread pools to enable/disable `at_exit` handler
23+
* Added a `:stop_on_exit` option to thread pools to enable/disable `at_exit` handler
2424
* Updated thread pool docs to better explain shutting down thread pools
2525
* Simpler `:executor` option syntax for all abstractions which support this option
2626
* Added `Executor#auto_terminate?` predicate method (for thread pools)
@@ -58,6 +58,30 @@
5858
- `Channel`
5959
- `Exchanger`
6060
- `LazyRegister`
61+
- **new Future Framework** <http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Edge.html> - unified
62+
implementation of Futures and Promises which combines Features of previous `Future`,
63+
`Promise`, `IVar`, `Event`, `Probe`, `dataflow`, `Delay`, `TimerTask` into single framework. It uses extensively
64+
new synchronization layer to make all the paths **lock-free** with exception of blocking threads on `#wait`.
65+
It offers better performance and does not block threads when not required.
66+
* Actor framework changes:
67+
- fixed reset loop in Pool
68+
- Pool can use any actor as a worker, abstract worker class is no longer needed.
69+
- Actor events not have format `[:event_name, *payload]` instead of just the Symbol.
70+
- Actor now uses new Future/Promise Framework instead of `IVar` for better interoperability
71+
- Behaviour definition array was simplified to `[BehaviourClass1, [BehaviourClass2, *initialization_args]]`
72+
- Linking behavior responds to :linked message by returning array of linked actors
73+
- Supervised behavior is removed in favour of just Linking
74+
- RestartingContext is supervised by default now, `supervise: true` is not required any more
75+
- Events can be private and public, so far only difference is that Linking will
76+
pass to linked actors only public messages. Adding private :restarting and
77+
:resetting events which are send before the actor restarts or resets allowing
78+
to add callbacks to cleanup current child actors.
79+
- Print also object_id in Reference to_s
80+
- Add AbstractContext#default_executor to be able to override executor class wide
81+
- Add basic IO example
82+
- Documentation somewhat improved
83+
- All messages should have same priority. It's now possible to send `actor << job1 << job2 << :terminate!` and
84+
be sure that both jobs are processed first.
6185
* Refactored `Channel` to use newer synchronization objects
6286
* Added `#reset` and `#cancel` methods to `TimerSet`
6387
* Added `#cancel` method to `Future` and `ScheduledTask`

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ be obeyed though. Features developed in `concurrent-ruby-edge` are expected to m
107107

108108
* [Actor](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Actor.html):
109109
Implements the Actor Model, where concurrent actors exchange messages.
110+
* [new Future Framework](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Edge.html) - new
111+
unified implementation of Futures and Promises which combines Features of previous `Future`,
112+
`Promise`, `IVar`, `Event`, `Probe`, `dataflow`, `Delay`, `TimerTask` into single framework. It uses extensively
113+
new synchronization layer to make all the paths **lock-free** with exception of blocking threads on `#wait`.
114+
It offers better performance and does not block threads when not required.
110115
* [Agent](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Agent.html): A single atomic value that represents an identity.
111116
* [Channel](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Channel.html):
112117
Communicating Sequential Processes (CSP).
@@ -120,6 +125,17 @@ be obeyed though. Features developed in `concurrent-ruby-edge` are expected to m
120125
intended).
121126

122127

128+
#### Statuses:
129+
130+
*Why is not in core?*
131+
132+
- **Actor** - partial documentation and tests, stability good.
133+
- **Future/Promise Framework** - partial documentation and tests, stability good.
134+
- **Agent** - incomplete behaviour compared to Clojure's model, stability good.
135+
- **Channel** - missing documentation, stability good.
136+
- **Exchanger** - known race issue.
137+
- **LazyRegister** - missing documentation and tests.
138+
123139
## Usage
124140

125141
All abstractions within this gem can be loaded simply by requiring it:
@@ -159,13 +175,14 @@ require 'concurrent/tvar' # Concurrent::TVar
159175
# experimental - available in `concurrent-ruby-edge` companion gem
160176

161177
require 'concurrent/actor' # Concurrent::Actor and supporting code
178+
require 'concurrent/edge/future' # new Future Framework
162179
require 'concurrent/agent' # Concurrent::Agent
163180
require 'concurrent/channel ' # Concurrent::Channel and supporting code
164181
require 'concurrent/exchanger' # Concurrent::Exchanger
165182
require 'concurrent/lazy_register' # Concurrent::LazyRegister
166183
```
167184

168-
If the library does not behave as expected, `Concurrent.use_stdlib_logger(Logger::DEBUG)` could help to revel the problem.
185+
If the library does not behave as expected, `Concurrent.use_stdlib_logger(Logger::DEBUG)` could help to reveal the problem.
169186

170187
## Installation
171188

lib/concurrent/edge/future.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module Concurrent
88
# Provides edge features, which will be added to or replace features in main gem.
99
#
1010
# Contains new unified implementation of Futures and Promises which combines Features of previous `Future`,
11-
# `Promise`, `IVar`, `Probe`, `dataflow`, `Delay`, `TimerTask` into single framework. It uses extensively
11+
# `Promise`, `IVar`, `Event`, `Probe`, `dataflow`, `Delay`, `TimerTask` into single framework. It uses extensively
1212
# new synchronization layer to make all the paths lock-free with exception of blocking threads on `#wait`.
1313
# It offers better performance and does not block threads (exception being `#wait` and similar methods where it's
1414
# intended).

0 commit comments

Comments
 (0)