Skip to content

Commit ffe427d

Browse files
committed
Update documentation
1 parent b2cd7e4 commit ffe427d

File tree

10 files changed

+115
-47
lines changed

10 files changed

+115
-47
lines changed

.github/CONTRIBUTING.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Contributing to Concurrent Ruby
22

3-
You want to contribute? Thank you! Concurrent Ruby is work of [many contributors](https://github.com/ruby-concurrency/concurrent-ruby/graphs/contributors). You're encouraged to submit [pull requests](https://github.com/ruby-concurrency/concurrent-ruby/pulls), [propose features and discuss issues](https://github.com/ruby-concurrency/concurrent-ruby/issues). When in doubt, ask a question in the [Concurrent Ruby gitter.im chatroom](https://gitter.im/ruby-concurrency/concurrent-ruby) or on the [mailing list](https://groups.google.com/forum/#!forum/concurrent-ruby).
3+
You want to contribute? Thank you! Concurrent Ruby is work of [many contributors](https://github.com/ruby-concurrency/concurrent-ruby/graphs/contributors). You're encouraged to submit [pull requests](https://github.com/ruby-concurrency/concurrent-ruby/pulls), [propose features and discuss issues](https://github.com/ruby-concurrency/concurrent-ruby/issues). When in doubt, ask a question in the [Concurrent Ruby gitter.im chatroom](https://gitter.im/ruby-concurrency/concurrent-ruby).
44

55
#### Find Something to Work on
66

7-
If you want to contribute but aren't sure what to work on, we keep our list of current todos on our [issues page](https://github.com/ruby-concurrency/concurrent-ruby/issues). Before starting, feel free to chat with us on [gitter](https://gitter.im/ruby-concurrency/concurrent-ruby).
7+
If you want to contribute but aren't sure what to work on, there are tasks marked with [**looking-for-contributor**](https://github.com/ruby-concurrency/concurrent-ruby/issues?q=is%3Aissue+is%3Aopen+label%3Alooking-for-contributor) label. Complete list of tasks can be found on [issues page](https://github.com/ruby-concurrency/concurrent-ruby/issues). We appreciate your help.
8+
9+
Before starting, feel free to chat with us on [gitter](https://gitter.im/ruby-concurrency/concurrent-ruby).
810

911
#### Fork the Project
1012

@@ -52,12 +54,12 @@ Make sure that `bundle exec rake` completes without errors.
5254

5355
#### Follow the Guidelines
5456

55-
There are a few very strong guidelines which we follow when adding features. Submissions which fail to follow these guidelines will likely be rejected or will require modification before acceptance.
57+
There are a few guidelines which we follow when adding features. Consider that submissions which do not follow these guidelines will require modification before acceptance.
5658

5759
* **No downstream dependencies:** Concurrent Ruby is a foundational library used by major projects like [Rails](http://rubyonrails.org/). Our downstream dependencies become everyone's dependencies. Because we cannot guarantee that downstream projects meet our development standards, it's best for everyone if we simply aviod dependencies.
5860
* **Do not monkey patch Ruby:** Changing Ruby for our convenience affects every gem in every project that uses Concurrent Ruby. Monkey patching Ruby may change the behavior of other libraries in unexpected ways and destabilize projects which depend on us.
5961
* **Do not pollute the global namespace:** Putting all our code within the `Concurrent` module guarantees that there will be no namespace collisions with other gems or the projects which depend on us.
60-
* **No global varaibles:** Global state should be kept to an absolute minimum. When it's necessary, add it to the global gem configuration.
62+
* **No global state:** We are removing global state we have.
6163
* **Minimize per-object configuration:** Ruby makes programmers happy. One of Ruby's charms is its simplicity. Concurrent Ruby aims to mirror this simplicity. Advanced configuration options are encouraged when they provide value, but every abstraction should have reasonable defaults that meet the needs of most users.
6264
* **Provide explicit behavior and guarantees:** Our APIs should be concrete and clearly define what they do (and don't do). Users of Concurrent Ruby should never be surprised by unexpected behavior or be given guarantees we cannot keep.
6365
* **Eat our own dog food:** Concurrent Ruby provides a rich set of low-level (internal and public) classes which provide strong guarantees and are optimized for performance across platforms. All our high-level abstractions should make use of these tools.
@@ -102,20 +104,13 @@ git rebase upstream/master
102104
git push origin my-feature-branch -f
103105
```
104106

105-
#### Update CHANGELOG Again
107+
#### Update CHANGELOG
106108

107109
Update the [CHANGELOG](CHANGELOG.md) with a description of what you have changed.
108110

109-
Amend your previous commit and force push the changes.
110-
111-
```
112-
git commit --amend
113-
git push origin my-feature-branch -f
114-
```
115-
116111
#### Check on Your Pull Request
117112

118-
Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI and AppVeyor. Everything should look green, otherwise fix issues and amend your commit as described above.
113+
Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI and AppVeyor. Everything should look green, otherwise fix issues (amending your commit).
119114

120115
Please note that testing concurrency is hard. Very hard. We have a few tests that occasionally fail due (mostly) to incorrect synchronization within the test itself. If everything passes locally but you see an error on CI, it's possibly you've become victim to one of the tests. Don't worry, the Concurrent Ruby team reviews the tests output of all failed CI runs and will let you know if the failing test is unrelated to your commit.
121116

CODE_OF_CONDUCT.md

Lines changed: 61 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,71 @@
1-
# Contributor Code of Conduct
1+
# Contributor Covenant Code of Conduct
22

3-
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
3+
## Our Pledge
44

5-
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project
7+
a harassment-free experience for *everyone*.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to creating a positive environment
12+
include:
13+
14+
* Using welcoming and inclusive language
15+
* Being respectful of differing viewpoints and experiences
16+
* Gracefully accepting constructive criticism
17+
* Focusing on what is best for the project
18+
* Showing empathy towards other project members
619

720
Examples of unacceptable behavior by participants include:
821

9-
* The use of sexualized language or imagery
10-
* Personal attacks
11-
* Trolling or insulting/derogatory comments
22+
* The use of sexualized language or imagery and unwelcome sexual attention or
23+
advances
24+
* Trolling, insulting/derogatory comments, and personal or political attacks
1225
* Public or private harassment
13-
* Publishing other's private information, such as physical or electronic addresses, without explicit permission
14-
* Other unethical or unprofessional conduct.
26+
* Publishing others' private information, such as a physical or electronic
27+
address, without explicit permission
28+
* Other conduct which could reasonably be considered inappropriate in a
29+
professional setting
30+
31+
## Our Responsibilities
32+
33+
Project maintainers are responsible for clarifying the standards of acceptable
34+
behavior and are expected to take appropriate and fair corrective action in
35+
response to any instances of unacceptable behavior.
36+
37+
Project maintainers have the right and responsibility to remove, edit, or
38+
reject comments, commits, code, wiki edits, issues, and other contributions
39+
that are not aligned to this Code of Conduct, or to ban temporarily or
40+
permanently any contributor for other behaviors that they deem inappropriate,
41+
threatening, offensive, or harmful.
42+
43+
## Scope
44+
45+
This Code of Conduct applies both within project spaces and in public spaces
46+
when an individual is representing the project. Examples of
47+
representing a project include using an official project e-mail
48+
address, posting via an official social media account, or acting as an appointed
49+
representative at an online or offline event. Representation of a project may be
50+
further defined and clarified by project maintainers.
51+
52+
## Enforcement
53+
54+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
55+
reported by contacting the project team at `[email protected]`. All
56+
complaints will be reviewed and investigated and will result in a response that
57+
is deemed necessary and appropriate to the circumstances. The project team is
58+
obligated to maintain confidentiality with regard to the reporter of an incident.
59+
Further details of specific enforcement policies may be posted separately.
1560

16-
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
61+
Project maintainers who do not follow or enforce the Code of Conduct in good
62+
faith may face temporary or permanent repercussions as determined by other
63+
members of the project's leadership.
1764

18-
This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
65+
## Attribution
1966

20-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
67+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
68+
available at [http://contributor-covenant.org/version/1/4][version]
2169

22-
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
70+
[homepage]: http://contributor-covenant.org
71+
[version]: http://contributor-covenant.org/version/1/4/

README.md

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,23 @@ and classic concurrency patterns.
2020

2121
The design goals of this gem are:
2222

23-
* Be an 'unopinionated' toolbox that provides useful utilities without
24-
debating which is better or why
23+
* Be an 'unopinionated' toolbox that provides useful utilities without debating which is better
24+
or why
2525
* Remain free of external gem dependencies
2626
* Stay true to the spirit of the languages providing inspiration
2727
* But implement in a way that makes sense for Ruby
2828
* Keep the semantics as idiomatic Ruby as possible
2929
* Support features that make sense in Ruby
3030
* Exclude features that don't make sense in Ruby
3131
* Be small, lean, and loosely coupled
32+
* Thread-safety
33+
* Backward compatibility
3234

3335
## Contributing
3436

35-
**This gem depends on contributions and we appreciate your help. Would you like to contribute?
36-
Great! Have a look at
37+
**This gem depends on
38+
[contributions](https://github.com/ruby-concurrency/concurrent-ruby/graphs/contributors) and we
39+
appreciate your help. Would you like to contribute? Great! Have a look at
3740
[issues with `looking-for-contributor` label](https://github.com/ruby-concurrency/concurrent-ruby/issues?q=is%3Aissue+is%3Aopen+label%3Alooking-for-contributor).**
3841

3942
## Thread Safety
@@ -55,15 +58,31 @@ other Ruby library, many of which support the mantra of
5558
Concurrent Ruby is also the only Ruby library which provides a full suite of thread safe and
5659
immutable variable types and data structures.
5760

61+
We've also initiated discussion to document [memory model](doc/synchronization.md) of Ruby which
62+
would provide consistent behaviour and guarantees on all three of the main Ruby interpreters
63+
(MRI/CRuby, JRuby, Rubinius, TruffleRuby).
64+
5865
## Features & Documentation
5966

6067
**The primary site for documentation is the automatically generated
6168
[API documentation](http://ruby-concurrency.github.io/concurrent-ruby/frames.html) which is up to
6269
date with latest release.** This readme matches the master so may contain new stuff not yet
6370
released.
6471

65-
We also have a [mailing list](http://groups.google.com/group/concurrent-ruby)
66-
and [IRC (gitter)](https://gitter.im/ruby-concurrency/concurrent-ruby).
72+
We also have a [IRC (gitter)](https://gitter.im/ruby-concurrency/concurrent-ruby).
73+
74+
### Versioning
75+
76+
* `concurrent-ruby` uses [Semantic Versioning](http://semver.org/)
77+
* `concurrent-ruby-ext` has always same version as `concurrent-ruby`
78+
* `concurrent-ruby-edge` will always be 0.y.z therefore following
79+
[point 4](http://semver.org/#spec-item-4) applies *"Major version zero
80+
(0.y.z) is for initial development. Anything may change at any time. The
81+
public API should not be considered stable."* However we additionally use
82+
following rules:
83+
* Minor version increment means incompatible changes were made
84+
* Patch version increment means only compatible changes were made
85+
6786

6887
#### General-purpose Concurrency Abstractions
6988

@@ -191,17 +210,17 @@ be obeyed though. Features developed in `concurrent-ruby-edge` are expected to m
191210

192211
* [Actor](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Actor.html): Implements
193212
the Actor Model, where concurrent actors exchange messages.
194-
Status: Partial documentation and tests; depends on new future/promise framework; stability is good.
213+
*Status: Partial documentation and tests; depends on new future/promise framework; stability is good.*
195214
* [Channel](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Edge/Channel.html):
196215
Communicating Sequential Processes ([CSP](https://en.wikipedia.org/wiki/Communicating_sequential_processes)).
197216
Functionally equivalent to Go [channels](https://tour.golang.org/concurrency/2) with additional
198217
inspiration from Clojure [core.async](https://clojure.github.io/core.async/).
199-
Status: Partial documentation and tests.
218+
*Status: Partial documentation and tests.*
200219
* [LazyRegister](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/LazyRegister.html)
201220
* [LockFreeLinkedSet](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Edge/LockFreeLinkedSet.html)
202-
Status: will be moved to core soon.
221+
*Status: will be moved to core soon.*
203222
* [LockFreeStack](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/LockFreeStack.html)
204-
Status: missing documentation and tests.
223+
*Status: missing documentation and tests.*
205224

206225
## Supported Ruby versions
207226

@@ -220,6 +239,8 @@ Everything within this gem can be loaded simply by requiring it:
220239
require 'concurrent'
221240
```
222241

242+
*Requiring only specific abstractions from Concurrent Ruby is not yet supported.*
243+
223244
To use the tools in the Edge gem it must be required separately:
224245

225246
```ruby
@@ -295,19 +316,22 @@ best practice is to depend on `concurrent-ruby` and let users to decide if they
295316

296317
## Maintainers
297318

298-
* [**Petr Chalupa**](https://github.com/pitr-ch) (lead maintainer)
319+
* [Petr Chalupa](https://github.com/pitr-ch) (lead maintainer, point-of-contact)
299320
* [Jerry D'Antonio](https://github.com/jdantonio) (creator)
300-
* [Michele Della Torre](https://github.com/mighe)
301321
* [Chris Seaton](https://github.com/chrisseaton)
302-
* [Paweł Obrok](https://github.com/obrok)
303-
* [Lucas Allan](https://github.com/lucasallan)
304322

305323
### Special Thanks
306324

307325
* [Brian Durand](https://github.com/bdurand) for the `ref` gem
308326
* [Charles Oliver Nutter](https://github.com/headius) for the `atomic` and `thread_safe` gems
309327
* [thedarkone](https://github.com/thedarkone) for the `thread_safe` gem
310328

329+
### Maintainer of the past
330+
331+
* [Michele Della Torre](https://github.com/mighe)
332+
* [Paweł Obrok](https://github.com/obrok)
333+
* [Lucas Allan](https://github.com/lucasallan)
334+
311335
## License and Copyright
312336

313337
*Concurrent Ruby* is free software released under the

lib-edge/concurrent/actor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module Concurrent
1212

1313
# {include:file:doc/actor/main.md}
1414
# @api Actor
15-
# @!macro edge_warning
15+
# @!macro warn.edge
1616
module Actor
1717

1818
require 'concurrent/actor/type_check'

lib-edge/concurrent/channel.rb

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

1111
# {include:file:doc/channel.md}
12-
# @!macro edge_warning
12+
# @!macro warn.edge
1313
class Channel
1414
extend Forwardable
1515
include Enumerable

lib-edge/concurrent/edge.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module Concurrent
1515
# features should remain in this module until merged into the core gem. This
1616
# will prevent namespace collisions.
1717
#
18-
# @!macro [attach] edge_warning
18+
# @!macro [attach] warn.edge
1919
# @api Edge
2020
# @note **Edge Features** are under active development and may change frequently.
2121
#

lib-edge/concurrent/edge/cancellation.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module Concurrent
1414
# end
1515
# sleep 0.1
1616
# cancellation.cancel # Stop the thread by cancelling
17-
# @!macro edge_warning
17+
# @!macro warn.edge
1818
class Cancellation < Synchronization::Object
1919
safe_initialization!
2020

@@ -133,7 +133,7 @@ def initialize(cancel)
133133
end
134134
end
135135

136-
# FIXME (pitr-ch 27-Mar-2016): cooperation with mutex, condition, select etc?
136+
# TODO (pitr-ch 27-Mar-2016): cooperation with mutex, condition, select etc?
137137
# TODO (pitr-ch 27-Mar-2016): examples (scheduled to be cancelled in 10 sec)
138138
end
139139
end

lib-edge/concurrent/edge/lock_free_linked_set.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +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
21+
# @!macro warn.edge
2222
class LockFreeLinkedSet
2323
include Enumerable
2424

lib-edge/concurrent/edge/processing_actor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module Concurrent
1313
# values = actors.map(&:termination).map(&:value)
1414
# values[0,5] # => [1, 2, 3, 4, 5]
1515
# values[-5, 5] # => [49996, 49997, 49998, 49999, 50000]
16-
# @!macro edge_warning
16+
# @!macro warn.edge
1717
class ProcessingActor < Synchronization::Object
1818
# TODO (pitr-ch 18-Dec-2016): (un)linking, bidirectional, sends special message, multiple link calls has no effect,
1919
# TODO (pitr-ch 21-Dec-2016): Make terminated a cancellation token?

lib-edge/concurrent/edge/throttle.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +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
51+
# @!macro warn.edge
5252
class Throttle < Synchronization::Object
5353
# TODO (pitr-ch 21-Dec-2016): consider using sized channel for implementation instead when available
5454

0 commit comments

Comments
 (0)