Added ThreadManager, removed PHP self-kill

This commit is contained in:
Shoghi Cervantes
2014-08-08 11:36:55 +02:00
parent 269a10fadd
commit 51120fdd4f
7 changed files with 160 additions and 14 deletions

View File

@ -21,7 +21,9 @@
namespace pocketmine\command;
class CommandReader extends \Thread{
use pocketmine\Thread;
class CommandReader extends Thread{
private $stream;
/** @var resource */
@ -36,7 +38,7 @@ class CommandReader extends \Thread{
*/
public function __construct($stream = "php://stdin"){
$this->stream = $stream;
$this->start(PTHREADS_INHERIT_ALL & ~PTHREADS_INHERIT_CLASSES);
$this->start();
}
private function readLine(){