File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ module ActorContext
77 def on_start
88 end
99
10- def on_restart
10+ def on_reset
1111 end
1212
1313 def on_shutdown
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ def supervise
6565 @actor . on_start
6666 @thread = new_worker_thread
6767 elsif ! @thread . alive?
68- @actor . on_restart
68+ @actor . on_reset
6969 @thread = new_worker_thread
7070 end
7171 end
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ module Concurrent
2222
2323 specify { subject . should respond_to :on_start }
2424
25- specify { subject . should respond_to :on_restart }
25+ specify { subject . should respond_to :on_reset }
2626
2727 specify { subject . should respond_to :on_shutdown }
2828 end
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ module Concurrent
6464 subject << :foo
6565 end
6666
67- it 'does not restart the thread after shutdown' do
67+ it 'does not reset the thread after shutdown' do
6868 thread = Thread . new { nil }
6969 Thread . should_receive ( :new ) . once . with ( no_args ) . and_return ( thread )
7070 subject << :foo
@@ -82,9 +82,9 @@ module Concurrent
8282 subject << :foo
8383 end
8484
85- it 'calls #on_restart when the thread is restarted ' do
85+ it 'calls #on_reset when the thread is reseted ' do
8686 actor = subject . instance_variable_get ( :@actor )
87- actor . should_receive ( :on_restart ) . once . with ( no_args )
87+ actor . should_receive ( :on_reset ) . once . with ( no_args )
8888 subject << :terminate
8989 sleep ( 0.1 )
9090 subject << :foo
You can’t perform that action at this time.
0 commit comments