Reading from the keyboard without blocking under EventMachine is pretty simple. Just use the builtin EM.open_keyboard and give it a connection handler. If you want to use Readline as well, unfortunately, you'll block the reactor unless you change the behavior of $stdin.
-
Pages
-
Archives
-
Categories
Archive for February 2012
Unblocking the Keyboard and Readline in EventMachine
Posted 2012-02-12 in Ruby » EventMachine
Tags: ruby, eventmachine, readline, keyboard