# File lib/core/container.rb, line 296
    def stop(error=nil)
      @lock.synchronize do
        raise StoppedError if @stopped
        @stopped = true
        @stop_err = Condition.convert(error)
        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