PocketMine-MP 5.21.2 git-a6534ecbbbcf369264567d27e5ed70f7f5be9816
|
Public Member Functions | |
__construct (private ThreadSafeLogger $logger, private int $id, private int $memoryLimit, private SleeperHandlerEntry $sleeperEntry) | |
getAsyncWorkerId () | |
getFromThreadStore (string $identifier) | |
getLogger () | |
getThreadName () | |
removeFromThreadStore (string $identifier) | |
saveToThreadStore (string $identifier, mixed $value) | |
Static Public Member Functions | |
static | getNotifier () |
Protected Member Functions | |
onRun () | |
Definition at line 35 of file AsyncWorker.php.
pocketmine\scheduler\AsyncWorker::__construct | ( | private ThreadSafeLogger | $logger, |
private int | $id, | ||
private int | $memoryLimit, | ||
private SleeperHandlerEntry | $sleeperEntry ) |
Definition at line 41 of file AsyncWorker.php.
pocketmine\scheduler\AsyncWorker::getAsyncWorkerId | ( | ) |
Definition at line 79 of file AsyncWorker.php.
pocketmine\scheduler\AsyncWorker::getFromThreadStore | ( | string | $identifier | ) |
Retrieves mixed data from the worker's thread-local object store.
Note that the thread-local object store could be cleared and your data might not exist, so your code should account for the possibility that what you're trying to retrieve might not exist.
Objects stored in this storage may ONLY be retrieved while the task is running.
Definition at line 106 of file AsyncWorker.php.
pocketmine\scheduler\AsyncWorker::getLogger | ( | ) |
Definition at line 71 of file AsyncWorker.php.
|
static |
Definition at line 48 of file AsyncWorker.php.
pocketmine\scheduler\AsyncWorker::getThreadName | ( | ) |
Definition at line 75 of file AsyncWorker.php.
|
protected |
Definition at line 55 of file AsyncWorker.php.
pocketmine\scheduler\AsyncWorker::removeFromThreadStore | ( | string | $identifier | ) |
Removes previously-stored mixed data from the worker's thread-local object store.
Definition at line 118 of file AsyncWorker.php.
pocketmine\scheduler\AsyncWorker::saveToThreadStore | ( | string | $identifier, |
mixed | $value ) |
Saves mixed data into the worker's thread-local object store. This can be used to store objects which you want to use on this worker thread from multiple AsyncTasks.
Definition at line 89 of file AsyncWorker.php.