mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-20 10:00:31 +00:00
Removed ThreadedFactory
This commit is contained in:
parent
8768b7fdbd
commit
472fcfa4c7
@ -104,7 +104,6 @@ namespace pocketmine {
|
||||
}
|
||||
|
||||
if(!class_exists("ClassLoader", false)){
|
||||
require_once(\pocketmine\PATH . "src/spl/ThreadedFactory.php");
|
||||
require_once(\pocketmine\PATH . "src/spl/ClassLoader.php");
|
||||
require_once(\pocketmine\PATH . "src/spl/BaseClassLoader.php");
|
||||
require_once(\pocketmine\PATH . "src/pocketmine/CompatibleClassLoader.php");
|
||||
|
@ -1400,7 +1400,7 @@ class Server{
|
||||
*/
|
||||
public function __construct(\ClassLoader $autoloader, \ThreadedLogger $logger, $filePath, $dataPath, $pluginPath){
|
||||
self::$instance = $this;
|
||||
self::$sleeper = \ThreadedFactory::create();
|
||||
self::$sleeper = new \Threaded;
|
||||
$this->autoloader = $autoloader;
|
||||
$this->logger = $logger;
|
||||
|
||||
|
@ -42,7 +42,7 @@ class ThreadManager extends \Volatile{
|
||||
*/
|
||||
public function add($thread){
|
||||
if($thread instanceof Thread or $thread instanceof Worker){
|
||||
$this->{spl_object_hash($thread)} = $thread;
|
||||
$this->{$thread->getThreadId()} = $thread;
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ class ThreadManager extends \Volatile{
|
||||
*/
|
||||
public function remove($thread){
|
||||
if($thread instanceof Thread or $thread instanceof Worker){
|
||||
unset($this->{spl_object_hash($thread)});
|
||||
unset($this->{$thread->getThreadId()});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ class CommandReader extends Thread{
|
||||
private $shutdown = false;
|
||||
|
||||
public function __construct(){
|
||||
$this->buffer = \ThreadedFactory::create();
|
||||
$this->buffer = new \Threaded;
|
||||
$this->start();
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ class MainLogger extends \AttachableThreadedLogger{
|
||||
touch($logFile);
|
||||
$this->logFile = $logFile;
|
||||
$this->logDebug = (bool) $logDebug;
|
||||
$this->logStream = \ThreadedFactory::create();
|
||||
$this->logStream = new \Threaded;
|
||||
$this->start();
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 08f0a0c1c49c8c00c6dd569c6c1d9768a699ea9a
|
||||
Subproject commit f6f207b9e47dc6fdb23b9e39dfcbabb545be9cd0
|
2
src/spl
2
src/spl
@ -1 +1 @@
|
||||
Subproject commit 612661afd49420743baec096b129f0c0f9df4023
|
||||
Subproject commit 82034afea351b0dbf8b1f9ad41cde9b9de3e1da6
|
Loading…
x
Reference in New Issue
Block a user