Skip to content

Commit 89ce879

Browse files
committed
Merge pull request #343 from sschepens/pool_doc_fix
Fix pool documentation
2 parents b0a71a9 + 1ca268a commit 89ce879

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/concurrent/actor/utils/pool.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ module Utils
1212
# @yieldparam [Integer] index of the worker, usually used in its name
1313
# @yieldreturn [Reference] the reference of newly created worker
1414
# @example
15-
# class Worker < Concurrent::Actor::Utils::AbstractWorker
16-
# def work(message)
15+
# class Worker < Concurrent::Actor::RestartingContext
16+
# def on_message(message)
1717
# p message * 5
1818
# end
1919
# end
2020
#
21-
# pool = Concurrent::Actor::Utils::Pool.spawn! 'pool', 5 do |balancer, index|
22-
# Worker.spawn name: "worker-#{index}", supervise: true, args: [balancer]
21+
# pool = Concurrent::Actor::Utils::Pool.spawn! 'pool', 5 do |index|
22+
# Worker.spawn name: "worker-#{index}", supervise: true, args: []
2323
# end
2424
#
2525
# pool << 'asd' << 2

0 commit comments

Comments
 (0)