Skip to content

Commit 199314f

Browse files
committed
Run Actors in pool do not spawn Thread per Actor
1 parent 026641c commit 199314f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/concurrent/actor/simple_actor_ref.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class SimpleActorRef
1111
def initialize(actor, opts = {})
1212
@actor = actor
1313
@mutex = Mutex.new
14-
@executor = SingleThreadExecutor.new
14+
@executor = OneByOne.new OptionsParser::get_executor_from(opts)
1515
@stop_event = Event.new
1616
@reset_on_error = opts.fetch(:reset_on_error, true)
1717
@exception_class = opts.fetch(:rescue_exception, false) ? Exception : StandardError
@@ -51,7 +51,6 @@ def post!(timeout, *msg)
5151
def shutdown
5252
@mutex.synchronize do
5353
return if shutdown?
54-
@executor.shutdown
5554
@actor.on_shutdown
5655
@stop_event.set
5756
end

0 commit comments

Comments
 (0)