Skip to content

Commit 94a2a9a

Browse files
committed
Update documentation
1 parent 4be5c85 commit 94a2a9a

File tree

361 files changed

+161438
-3886
lines changed

Some content is hidden

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

361 files changed

+161438
-3886
lines changed

docs-source/channel.out.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ threads = Array.new(3) { |i| Thread.new { ch.push message: i } }
1616
sleep 0.01 # let the threads run
1717
threads
1818
# => [#<Thread:[email protected]:14 dead>,
19-
# #<Thread:[email protected]:14 sleep_forever>,
20-
# #<Thread:[email protected]:14 dead>]
19+
# #<Thread:[email protected]:14 dead>,
20+
# #<Thread:[email protected]:14 sleep_forever>]
2121
```
2222

2323
When message is popped the last thread continues and finishes as well.
2424

2525
```ruby
26-
ch.pop # => {:message=>0}
26+
ch.pop # => {:message=>1}
2727
threads.map(&:join)
2828
# => [#<Thread:[email protected]:14 dead>,
2929
# #<Thread:[email protected]:14 dead>,
@@ -45,7 +45,7 @@ threads
4545
ch.push message: 3
4646
# => #<Concurrent::Promises::Channel:0x000002 capacity taken 0 of 2>
4747
threads.map(&:value)
48-
# => [{:message=>2}, {:message=>1}, {:message=>3}]
48+
# => [{:message=>0}, {:message=>2}, {:message=>3}]
4949
```
5050

5151
### Promises integration
@@ -204,17 +204,17 @@ log
204204
# "producer 0 pushing 2",
205205
# "producer 1 pushing 0",
206206
# "consumer 0 got 0. payload 0 from producer 0",
207+
# "producer 0 pushing 3",
207208
# "consumer 1 got 0. payload 1 from producer 0",
208209
# "consumer 2 got 0. payload 2 from producer 0",
209210
# "consumer 3 got 0. payload 0 from producer 1",
210-
# "producer 0 pushing 3",
211211
# "producer 1 pushing 1",
212212
# "producer 1 pushing 2",
213213
# "consumer 1 got 1. payload 3 from producer 0",
214214
# "producer 1 pushing 3",
215-
# "consumer 0 got 1. payload 1 from producer 1",
216-
# "consumer 2 got 1. payload 2 from producer 1",
217-
# "consumer 3 got 1. payload 3 from producer 1"]
215+
# "consumer 2 got 1. payload 1 from producer 1",
216+
# "consumer 3 got 1. payload 2 from producer 1",
217+
# "consumer 0 got 1. payload 3 from producer 1"]
218218
```
219219

220220
The producers are much faster than consumers
@@ -269,20 +269,20 @@ consumers.map(&:value!) # => [:done, :done, :done, :done]
269269
log
270270
# => ["producer 0 pushing 0",
271271
# "producer 1 pushing 0",
272-
# "producer 0 pushing 1",
273272
# "producer 1 pushing 1",
274-
# "consumer 0 got 0. payload 0 from producer 0",
275273
# "consumer 1 got 0. payload 0 from producer 1",
276-
# "consumer 2 got 0. payload 1 from producer 0",
274+
# "consumer 2 got 0. payload 1 from producer 1",
275+
# "producer 0 pushing 1",
277276
# "producer 0 pushing 2",
278-
# "consumer 3 got 0. payload 1 from producer 1",
279-
# "producer 1 pushing 2",
280277
# "producer 0 pushing 3",
278+
# "producer 1 pushing 2",
279+
# "consumer 0 got 0. payload 0 from producer 0",
280+
# "consumer 3 got 0. payload 1 from producer 0",
281281
# "producer 1 pushing 3",
282-
# "consumer 1 got 1. payload 2 from producer 0",
283-
# "consumer 2 got 1. payload 2 from producer 1",
284-
# "consumer 0 got 1. payload 3 from producer 0",
285-
# "consumer 3 got 1. payload 3 from producer 1"]
282+
# "consumer 2 got 1. payload 2 from producer 0",
283+
# "consumer 1 got 1. payload 3 from producer 0",
284+
# "consumer 3 got 1. payload 3 from producer 1",
285+
# "consumer 0 got 1. payload 2 from producer 1"]
286286
```
287287

288288
### Synchronization of workers by passing a value

docs-source/medium-example.out.rb

Lines changed: 516 additions & 522 deletions
Large diffs are not rendered by default.

docs-source/signpost.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Pick a `concurrent-ruby` version:
44

55
* [master](./master/index.html)
6+
* [1.1.6 with edge 0.6.0](./1.1.5/index.html)
67
* [1.1.5 with edge 0.5.0](./1.1.5/index.html)
78
* [1.1.4 with edge 0.4.1](./1.1.4/index.html)
89
* [1.0.5 with edge 0.3.1](./1.0.5/index.html)

docs/1.1.6/Concurrent.html

Lines changed: 3201 additions & 0 deletions
Large diffs are not rendered by default.

docs/1.1.6/Concurrent/Actor.html

Lines changed: 1300 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)