@@ -119,6 +119,8 @@ module Concurrent
119
119
#
120
120
# ping << :pong
121
121
#
122
+ # @deprecated +Actor+ is being replaced with a completely new framework prior to v1.0.0
123
+ #
122
124
# @see http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html
123
125
class Actor
124
126
include Observable
@@ -174,6 +176,8 @@ def initialize(queue)
174
176
# #=> [6] handled by #<EchoActor:0x007fc8014fb8b8>
175
177
# #=> [7] handled by #<EchoActor:0x007fc8014fb818>
176
178
# #=> [8] handled by #<EchoActor:0x007fc8014fb890>
179
+ #
180
+ # @deprecated +Actor+ is being replaced with a completely new framework prior to v1.0.0
177
181
def self . pool ( count , *args , &block )
178
182
raise ArgumentError . new ( 'count must be greater than zero' ) unless count > 0
179
183
mailbox = Queue . new
@@ -202,24 +206,32 @@ def self.pool(count, *args, &block)
202
206
# @return [Object] the result obtained when the message is successfully processed
203
207
#
204
208
# @raise NotImplementedError unless overridden in the +Actor+ subclass
209
+ #
210
+ # @deprecated +Actor+ is being replaced with a completely new framework prior to v1.0.0
205
211
#
206
212
# @!visibility public
207
213
def act ( *message )
208
214
raise NotImplementedError . new ( "#{ self . class } does not implement #act" )
209
215
end
210
216
211
217
# @!visibility private
218
+ #
219
+ # @deprecated +Actor+ is being replaced with a completely new framework prior to v1.0.0
212
220
def on_run # :nodoc:
213
221
queue . clear
214
222
end
215
223
216
224
# @!visibility private
225
+ #
226
+ # @deprecated +Actor+ is being replaced with a completely new framework prior to v1.0.0
217
227
def on_stop # :nodoc:
218
228
queue . clear
219
229
queue . push ( :stop )
220
230
end
221
231
222
232
# @!visibility private
233
+ #
234
+ # @deprecated +Actor+ is being replaced with a completely new framework prior to v1.0.0
223
235
def on_task # :nodoc:
224
236
package = queue . pop
225
237
return if package == :stop
@@ -247,6 +259,8 @@ def on_task # :nodoc:
247
259
end
248
260
249
261
# @!visibility private
262
+ #
263
+ # @deprecated +Actor+ is being replaced with a completely new framework prior to v1.0.0
250
264
def on_error ( time , msg , ex ) # :nodoc:
251
265
end
252
266
end
0 commit comments