Skip to content

Commit 6442a2f

Browse files
committed
Added stopped check in SimpleActorRef#shutdown.
1 parent 45fd866 commit 6442a2f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/concurrent/simple_actor_ref.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def post!(seconds, *msg)
5252

5353
def shutdown
5454
@mutex.synchronize do
55+
return if @stopped
5556
@stopped = true
5657
if @thread && @thread.alive?
5758
@thread.kill

0 commit comments

Comments
 (0)