title: How do I listen to STDIN input without pausing my script?
body: <p>I have a <code>while</code> loop consistently listening to incoming connections and outputting them to console. I would like to be able to issue commands via the console without affecting the output. I've tried:</p>
  
  <pre><code>Thread.new do
      while true
          input   = gets.chomp
          puts "So I herd u sed, \"#{input}\"."
          #Commands would be in this scope
      end
  end
  </code></pre>
  
  <p>However, that seems to pause my entire script until input is received; and even then, some threads I have initiated before this one don't seem to execute. I've tried looking at TCPSocket's <code>select()</code> method to no avail.</p>