Improve command reader

This commit is contained in:
Tatsuyuki Ishi 2016-04-24 18:57:22 +09:00
commit 900da36a1f

View file

@ -91,7 +91,9 @@ class CommandReader extends Thread{
if($this->readline){
readline_callback_handler_install("Genisys> ", [$this, "readline_callback"]);
$this->logger->setConsoleCallback("readline_redisplay");
}
}else{
stream_set_blocking($this->stdin, false);
}
while(!$this->shutdown){
$r = [$this->stdin];
@ -112,7 +114,9 @@ class CommandReader extends Thread{
if($this->readline){
$this->logger->setConsoleCallback(null);
readline_callback_handler_remove();
}
}else{
stream_set_blocking($this->stdin, true);
}
}
public function getThreadName(){