Skip to content

Commit 49d8611

Browse files
committed
Added deprecation warnings to Actor class.
1 parent 6442a2f commit 49d8611

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/concurrent/actor.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ def initialize(queue)
179179
#
180180
# @deprecated +Actor+ is being replaced with a completely new framework prior to v1.0.0
181181
def self.pool(count, *args, &block)
182+
warn '[DEPRECATED] `Actor` is deprecated and will be replaced with `ActorContext`.'
182183
raise ArgumentError.new('count must be greater than zero') unless count > 0
183184
mailbox = Queue.new
184185
actors = count.times.collect do
@@ -211,13 +212,15 @@ def self.pool(count, *args, &block)
211212
#
212213
# @!visibility public
213214
def act(*message)
215+
warn '[DEPRECATED] `Actor` is deprecated and will be replaced with `ActorContext`.'
214216
raise NotImplementedError.new("#{self.class} does not implement #act")
215217
end
216218

217219
# @!visibility private
218220
#
219221
# @deprecated +Actor+ is being replaced with a completely new framework prior to v1.0.0
220222
def on_run # :nodoc:
223+
warn '[DEPRECATED] `Actor` is deprecated and will be replaced with `ActorContext`.'
221224
queue.clear
222225
end
223226

0 commit comments

Comments
 (0)