Skip to content

Commit 0bd3956

Browse files
committed
Doc update
* add missing edge warnings * readme update * todo updates
1 parent 88bc209 commit 0bd3956

File tree

11 files changed

+34
-24
lines changed

11 files changed

+34
-24
lines changed

.yardopts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
--default-return undocumented
99

1010
./lib/**/*.rb
11+
./lib-edge/**/*.rb
1112
./ext/concurrent_ruby_ext/**/*.c
1213
-
1314
doc/thread_pools.md

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
[![Gem Version](https://badge.fury.io/rb/concurrent-ruby.svg)](http://badge.fury.io/rb/concurrent-ruby)
44
[![Build Status](https://travis-ci.org/ruby-concurrency/concurrent-ruby.svg?branch=master)](https://travis-ci.org/ruby-concurrency/concurrent-ruby)
55
[![Build status](https://ci.appveyor.com/api/projects/status/iq8aboyuu3etad4w?svg=true)](https://ci.appveyor.com/project/rubyconcurrency/concurrent-ruby)
6-
[![Inline docs](http://inch-ci.org/github/ruby-concurrency/concurrent-ruby.svg)](http://inch-ci.org/github/ruby-concurrency/concurrent-ruby)
76
[![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)
87
[![Gitter chat](https://img.shields.io/badge/IRC%20(gitter)-devs%20%26%20users-brightgreen.svg)](https://gitter.im/ruby-concurrency/concurrent-ruby)
98

@@ -52,11 +51,19 @@ We also have a [mailing list](http://groups.google.com/group/concurrent-ruby) an
5251
#### General-purpose Concurrency Abstractions
5352

5453
* [Async](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Async.html): A mixin module that provides simple asynchronous behavior to a class. Loosely based on Erlang's [gen_server](http://www.erlang.org/doc/man/gen_server.html).
55-
* [Future](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Future.html): An asynchronous operation that produces a value.
56-
* [Dataflow](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent.html#dataflow-class_method): Built on Futures, Dataflow allows you to create a task that will be scheduled when all of its data dependencies are available.
57-
* [Promise](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Promise.html): Similar to Futures, with more features.
5854
* [ScheduledTask](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/ScheduledTask.html): Like a Future scheduled for a specific future time.
5955
* [TimerTask](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/TimerTask.html): A Thread that periodically wakes up to perform work at regular intervals.
56+
* [Promises Framework](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Promises.html):
57+
Unified implementation of futures and promises which combines features of previous `Future`,
58+
`Promise`, `IVar`, `Event`, `dataflow`, `Delay`, and (partially) `TimerTask` into a single framework. It extensively uses the
59+
new synchronization layer to make all the features **non-blocking** and **lock-free**, with the exception of obviously blocking
60+
operations like `#wait`, `#value`. It also offers better performance.
61+
62+
Deprecated:
63+
64+
* ~~[Future](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Future.html): An asynchronous operation that produces a value.~~
65+
* ~~[Dataflow](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent.html#dataflow-class_method): Built on Futures, Dataflow allows you to create a task that will be scheduled when all of its data dependencies are available.~~
66+
* ~~[Promise](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Promise.html): Similar to Futures, with more features.~~
6067

6168
#### Thread-safe Value Objects, Structures, and Collections
6269

@@ -115,13 +122,6 @@ These features are under active development and may change frequently. They are
115122
keep backward compatibility (there may also lack tests and documentation). Semantic versions will
116123
be obeyed though. Features developed in `concurrent-ruby-edge` are expected to move to `concurrent-ruby` when final.
117124

118-
* [Promises Framework](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Promises.html):
119-
Unified implementation of futures and promises which combines features of previous `Future`,
120-
`Promise`, `IVar`, `Event`, `dataflow`, `Delay`, and `TimerTask` into a single framework. It extensively uses the
121-
new synchronization layer to make all the features **non-blocking** and **lock-free**, with the exception of
122-
obviously blocking operations like `#wait`, `#value`. It also offers better performance.
123-
Status: The framework is being finalized so it can be moved to core. It will eventually replace old implementations
124-
it replaces.
125125
* [Actor](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Actor.html):
126126
Implements the Actor Model, where concurrent actors exchange messages.
127127
Status: Partial documentation and tests; depends on new future/promise framework; stability is good.

lib-edge/concurrent/channel.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
module Concurrent
1010

1111
# {include:file:doc/channel.md}
12+
# @!macro edge_warning
1213
class Channel
1314
extend Forwardable
1415
include Enumerable

lib/concurrent/edge.rb renamed to lib-edge/concurrent/edge.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ module Concurrent
1717
#
1818
# @!macro [attach] edge_warning
1919
# @api Edge
20-
# @note **Edge Feature:** Edge features are under active development and may change frequently. They are expected not to
21-
# keep backward compatibility (there may also lack tests and documentation). Semantic versions will
22-
# be obeyed though. Features developed in `concurrent-ruby-edge` are expected to move
23-
# to `concurrent-ruby` when final.
20+
# @note **Edge Features** are under active development and may change frequently.
21+
#
22+
# - Deprecations are not added before incompatible changes.
23+
# - Edge version: _major_ is always 0, _minor_ bump means incompatible change,
24+
# _patch_ bump means compatible change.
25+
# - Edge features may also lack tests and documentation.
26+
# - Features developed in `concurrent-ruby-edge` are expected to move
27+
# to `concurrent-ruby` when finalised.
2428
module Edge
2529
end
2630
end

lib-edge/concurrent/edge/cancellation.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module Concurrent
1414
# end
1515
# sleep 0.1
1616
# cancellation.cancel # Stop the thread by cancelling
17+
# @!macro edge_warning
1718
class Cancellation < Synchronization::Object
1819
safe_initialization!
1920

lib-edge/concurrent/edge/lock_free_linked_set.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module Edge
1818
#
1919
# This algorithm is a variation of the Nonblocking Linked Set found in
2020
# 'The Art of Multiprocessor Programming' by Herlihy and Shavit.
21+
# @!macro edge_warning
2122
class LockFreeLinkedSet
2223
include Enumerable
2324

lib-edge/concurrent/edge/processing_actor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def ask(message, answer = Promises.resolvable_future)
135135
).chain do |fulfilled, (which, value), (_, reason)|
136136
# TODO (pitr-ch 20-Jan-2017): we have to know which future was resolved
137137
# TODO (pitr-ch 20-Jan-2017): make the combinator programmable, so anyone can create what is needed
138-
# TODO (pitr-ch 19-Jan-2017): ensure no callbacks are accumulated on @Terminated
138+
# FIXME (pitr-ch 19-Jan-2017): ensure no callbacks are accumulated on @Terminated
139139
if which == :termination
140140
raise reason.nil? ? format('actor terminated normally before answering with a value: %s', value) : reason
141141
else

lib-edge/concurrent/edge/promises.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
# TODO try stealing pool, each thread has it's own queue
2-
# TODO (pitr-ch 18-Dec-2016): doc macro debug method
3-
# TODO (pitr-ch 18-Dec-2016): add macro noting that debug methods may change api without warning
4-
5-
# FIXME (pitr-ch 23-Feb-2017): documentation has to clearly explain what is an edge method and what is not
62

73
require 'concurrent/promises'
84

@@ -122,7 +118,6 @@ def then_push_channel(channel)
122118
self.then { |value| channel.push value }.flat_future
123119
end
124120

125-
# TODO (pitr-ch 26-Dec-2016): does it make sense to have rescue an chain variants as well, check other integrations as well
126121
end
127122

128123
include NewChannelIntegration

lib-edge/concurrent/edge/throttle.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ module Concurrent
4848
# @!macro throttle.example.throttled_future
4949
# @!macro throttle.example.throttled_future_chain
5050
# @!macro throttle.example.throttled_block
51+
# @!macro edge_warning
5152
class Throttle < Synchronization::Object
5253
# TODO (pitr-ch 21-Dec-2016): consider using sized channel for implementation instead when available
5354

lib/concurrent/future.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
require 'concurrent/options'
88

9+
# TODO (pitr-ch 14-Mar-2017): deprecate, Future, Promise, etc.
10+
911
module Concurrent
1012

1113
# {include:file:doc/future.md}

0 commit comments

Comments
 (0)