PocketMine-MP 5.21.2 git-a6534ecbbbcf369264567d27e5ed70f7f5be9816
Loading...
Searching...
No Matches
pocketmine\thread\Worker Class Reference
+ Inheritance diagram for pocketmine\thread\Worker:
+ Collaboration diagram for pocketmine\thread\Worker:

Detailed Description

Specialized Worker class for PocketMine-MP-related use cases. It handles setting up autoloading and error handling.

Workers are a special type of thread which execute tasks passed to them during their lifetime. Since creating a new thread has a high resource cost, workers can be kept around and reused for lots of short-lived tasks.

As a plugin developer, you'll rarely (if ever) actually need to use this class directly. If you want to run tasks on other CPU cores, check out AsyncTask first.

See also
AsyncTask

Definition at line 39 of file Worker.php.


The documentation for this class was generated from the following file: