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
7
7
def on_start
8
8
end
9
9
10
- def on_restart
10
+ def on_reset
11
11
end
12
12
13
13
def on_shutdown
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ def supervise
65
65
@actor . on_start
66
66
@thread = new_worker_thread
67
67
elsif ! @thread . alive?
68
- @actor . on_restart
68
+ @actor . on_reset
69
69
@thread = new_worker_thread
70
70
end
71
71
end
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ module Concurrent
22
22
23
23
specify { subject . should respond_to :on_start }
24
24
25
- specify { subject . should respond_to :on_restart }
25
+ specify { subject . should respond_to :on_reset }
26
26
27
27
specify { subject . should respond_to :on_shutdown }
28
28
end
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ module Concurrent
64
64
subject << :foo
65
65
end
66
66
67
- it 'does not restart the thread after shutdown' do
67
+ it 'does not reset the thread after shutdown' do
68
68
thread = Thread . new { nil }
69
69
Thread . should_receive ( :new ) . once . with ( no_args ) . and_return ( thread )
70
70
subject << :foo
@@ -82,9 +82,9 @@ module Concurrent
82
82
subject << :foo
83
83
end
84
84
85
- it 'calls #on_restart when the thread is restarted ' do
85
+ it 'calls #on_reset when the thread is reseted ' do
86
86
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 )
88
88
subject << :terminate
89
89
sleep ( 0.1 )
90
90
subject << :foo
You can’t perform that action at this time.
0 commit comments