# Re: Simultaneous text input/output in a command line game

**URL:** <https://www.ruby-forum.com/t/re-simultaneous-text-input-output-in-a-command-line-game/66072>\
**Category:** Ruby\
**Created:** [February 12, 2006, 7:17am UTC](https://www.ruby-forum.com/t/re-simultaneous-text-input-output-in-a-command-line-game/66072 "2006-02-12T07:17:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gennady\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c57346/32.png) [@Gennady\_B](https://www.ruby-forum.com/u/Gennady_B)\
**Post date:** [February 12, 2006, 7:17am UTC](https://www.ruby-forum.com/t/re-simultaneous-text-input-output-in-a-command-line-game/66072/1 "2006-02-12T07:17:47Z")

</div>

Just from the tip of my head:

t = Thread.new {  
while true  
sleep 5  
puts "What are you waiting for, dude? Enter something now: "  
end  
}  
puts "Enter something: "  
s = gets  
t.kill  
puts “You entered: #{s.inspect}”

Gennady.
