Move thread-related classes from pocketmine to pocketmine\thread namespace

This commit is contained in:
Dylan K. Taylor 2019-06-18 17:36:25 +01:00
parent 075f49aef0
commit c66af4648c
10 changed files with 13 additions and 10 deletions

View File

@ -28,6 +28,7 @@ namespace {
namespace pocketmine {
use pocketmine\thread\ThreadManager;
use pocketmine\utils\MainLogger;
use pocketmine\utils\Process;
use pocketmine\utils\ServerKiller;

View File

@ -24,7 +24,7 @@ declare(strict_types=1);
namespace pocketmine\command;
use pocketmine\snooze\SleeperNotifier;
use pocketmine\Thread;
use pocketmine\thread\Thread;
use pocketmine\utils\Utils;
use function extension_loaded;
use function fclose;

View File

@ -33,7 +33,7 @@ use function unserialize;
*
* An AsyncTask does not have its own thread. It is queued into an AsyncPool and executed if there is an async worker
* with no AsyncTask running. Therefore, an AsyncTask SHOULD NOT execute for more than a few seconds. For tasks that
* run for a long time or infinitely, start another {@link \pocketmine\Thread} instead.
* run for a long time or infinitely, start another {@link \pocketmine\thread\Thread} instead.
*
* WARNING: Any non-Threaded objects WILL BE SERIALIZED when assigned to members of AsyncTasks or other Threaded object.
* If later accessed from said Threaded object, you will be operating on a COPY OF THE OBJECT, NOT THE ORIGINAL OBJECT.

View File

@ -23,8 +23,8 @@ declare(strict_types=1);
namespace pocketmine\scheduler;
use pocketmine\thread\Worker;
use pocketmine\utils\MainLogger;
use pocketmine\Worker;
use function gc_enable;
use function ini_set;

View File

@ -21,8 +21,9 @@
declare(strict_types=1);
namespace pocketmine;
namespace pocketmine\thread;
use pocketmine\Server;
use function error_reporting;
/**

View File

@ -21,7 +21,7 @@
declare(strict_types=1);
namespace pocketmine;
namespace pocketmine\thread;
use function spl_object_id;

View File

@ -21,8 +21,9 @@
declare(strict_types=1);
namespace pocketmine;
namespace pocketmine\thread;
use pocketmine\Server;
use function error_reporting;
/**

View File

@ -24,8 +24,8 @@ declare(strict_types=1);
namespace pocketmine\utils;
use LogLevel;
use pocketmine\Thread;
use pocketmine\Worker;
use pocketmine\thread\Thread;
use pocketmine\thread\Worker;
use function fclose;
use function fopen;
use function fwrite;

View File

@ -23,7 +23,7 @@ declare(strict_types=1);
namespace pocketmine\utils;
use pocketmine\ThreadManager;
use pocketmine\thread\ThreadManager;
use function count;
use function exec;
use function fclose;

View File

@ -23,7 +23,7 @@ declare(strict_types=1);
namespace pocketmine\utils;
use pocketmine\Thread;
use pocketmine\thread\Thread;
use function getmypid;
use function time;