PocketMine-MP 5.24.1 git-39e69276a1bbe86ebd583e834381e5bc73948564
|
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 () |
static | maybeCollectCycles () |
Protected Member Functions | |
onRun () | |
Definition at line 36 of file AsyncWorker.php.
pocketmine\scheduler\AsyncWorker::__construct | ( | private ThreadSafeLogger | $logger, |
private int | $id, | ||
private int | $memoryLimit, | ||
private SleeperHandlerEntry | $sleeperEntry ) |
Definition at line 43 of file AsyncWorker.php.
pocketmine\scheduler\AsyncWorker::getAsyncWorkerId | ( | ) |
Definition at line 88 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 115 of file AsyncWorker.php.
pocketmine\scheduler\AsyncWorker::getLogger | ( | ) |
Definition at line 80 of file AsyncWorker.php.
|
static |
Definition at line 50 of file AsyncWorker.php.
pocketmine\scheduler\AsyncWorker::getThreadName | ( | ) |
Definition at line 84 of file AsyncWorker.php.
|
static |
Definition at line 57 of file AsyncWorker.php.
|
protected |
Definition at line 64 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 127 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 98 of file AsyncWorker.php.