mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 16:24:05 +00:00
Move thread-related classes from pocketmine to pocketmine\thread namespace
This commit is contained in:
parent
075f49aef0
commit
c66af4648c
@ -28,6 +28,7 @@ namespace {
|
||||
|
||||
namespace pocketmine {
|
||||
|
||||
use pocketmine\thread\ThreadManager;
|
||||
use pocketmine\utils\MainLogger;
|
||||
use pocketmine\utils\Process;
|
||||
use pocketmine\utils\ServerKiller;
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
||||
|
@ -21,8 +21,9 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pocketmine;
|
||||
namespace pocketmine\thread;
|
||||
|
||||
use pocketmine\Server;
|
||||
use function error_reporting;
|
||||
|
||||
/**
|
@ -21,7 +21,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pocketmine;
|
||||
namespace pocketmine\thread;
|
||||
|
||||
use function spl_object_id;
|
||||
|
@ -21,8 +21,9 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pocketmine;
|
||||
namespace pocketmine\thread;
|
||||
|
||||
use pocketmine\Server;
|
||||
use function error_reporting;
|
||||
|
||||
/**
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -23,7 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\utils;
|
||||
|
||||
use pocketmine\Thread;
|
||||
use pocketmine\thread\Thread;
|
||||
use function getmypid;
|
||||
use function time;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user