# File lib/core/container.rb, line 227 def stop(error=nil, panic=nil) @lock.synchronize do return if @stopped @stop_err = Condition.convert(error) @panic = panic @stopped = true check_stop_lh # NOTE: @stopped => # - no new run threads can join # - no more select calls after next wakeup # - once @active == 0, all threads will be stopped with nil end wake end