mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
Clarified that AsyncTask should not run for a long time
This commit is contained in:
parent
75fa2f1132
commit
ab4d6b1e36
@ -27,6 +27,10 @@ use pocketmine\Server;
|
||||
/**
|
||||
* Class used to run async tasks in other threads.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* WARNING: Do not call PocketMine-MP API methods, or save objects (and arrays cotaining objects) from/on other Threads!!
|
||||
*/
|
||||
abstract class AsyncTask extends Collectable{
|
||||
|
Loading…
x
Reference in New Issue
Block a user