PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
pocketmine\scheduler\TimingsControlTask Class Reference
+ Inheritance diagram for pocketmine\scheduler\TimingsControlTask:
+ Collaboration diagram for pocketmine\scheduler\TimingsControlTask:

Public Member Functions

 cancelRun ()
 
 checkProgressUpdates ()
 
 getResult ()
 
 hasCancelledRun ()
 
 hasResult ()
 
 isCrashed ()
 
 isFinished ()
 
 isSubmitted ()
 
 onCompletion ()
 
 onError ()
 
 onProgressUpdate ($progress)
 
 onRun ()
 
 publishProgress (mixed $progress)
 
 run ()
 
 setResult (mixed $result)
 
 setSubmitted ()
 

Static Public Member Functions

static reload ()
 
static setEnabled (bool $enable)
 

Protected Member Functions

 fetchLocal (string $key)
 
 reallyDestruct ()
 
 storeLocal (string $key, mixed $complexData)
 

Detailed Description

Definition at line 28 of file TimingsControlTask.php.

Member Function Documentation

◆ cancelRun()

pocketmine\scheduler\AsyncTask::cancelRun ( )
inherited
Deprecated

Definition at line 134 of file AsyncTask.php.

◆ checkProgressUpdates()

pocketmine\scheduler\AsyncTask::checkProgressUpdates ( )
inherited
Deprecated

Definition at line 186 of file AsyncTask.php.

◆ fetchLocal()

pocketmine\scheduler\AsyncTask::fetchLocal ( string $key)
protectedinherited

Retrieves data stored in thread-local storage.

If you used storeLocal(), you can use this on the same thread to fetch data stored. This should be used during onProgressUpdate() and onCompletion() to fetch thread-local data stored on the parent thread.

Returns
mixed
Exceptions

InvalidArgumentException if no data were stored by this AsyncTask instance.

Definition at line 244 of file AsyncTask.php.

◆ getResult()

pocketmine\scheduler\AsyncTask::getResult ( )
inherited
Returns
mixed

Definition at line 120 of file AsyncTask.php.

◆ hasCancelledRun()

pocketmine\scheduler\AsyncTask::hasCancelledRun ( )
inherited
Deprecated

Definition at line 141 of file AsyncTask.php.

◆ hasResult()

pocketmine\scheduler\AsyncTask::hasResult ( )
inherited

Definition at line 113 of file AsyncTask.php.

◆ isCrashed()

pocketmine\scheduler\AsyncTask::isCrashed ( )
inherited
Deprecated

Definition at line 101 of file AsyncTask.php.

◆ isFinished()

pocketmine\scheduler\AsyncTask::isFinished ( )
inherited

Returns whether this task has finished executing, whether successfully or not. This differs from isRunning() because it is not true prior to task execution.

Definition at line 109 of file AsyncTask.php.

◆ isSubmitted()

pocketmine\scheduler\AsyncTask::isSubmitted ( )
inherited

Definition at line 149 of file AsyncTask.php.

◆ onCompletion()

pocketmine\scheduler\AsyncTask::onCompletion ( )
inherited

◆ onError()

pocketmine\scheduler\AsyncTask::onError ( )
inherited
Deprecated
No longer used

Definition at line 212 of file AsyncTask.php.

◆ onProgressUpdate()

pocketmine\scheduler\AsyncTask::onProgressUpdate ( $progress)
inherited
Deprecated

Called from the main thread after AsyncTask::publishProgress is called. All AsyncTask::publishProgress calls should result in AsyncTask::onProgressUpdate calls before AsyncTask::onCompletion is called.

Parameters
mixed$progressThe parameter passed to AsyncTask#publishProgress. It is serialize()'ed and then unserialize()'ed, as if it has been cloned.

Definition at line 205 of file AsyncTask.php.

◆ onRun()

pocketmine\scheduler\TimingsControlTask::onRun ( )

Actions to execute when run

Reimplemented from pocketmine\scheduler\AsyncTask.

Definition at line 46 of file TimingsControlTask.php.

◆ publishProgress()

pocketmine\scheduler\AsyncTask::publishProgress ( mixed $progress)
inherited
Deprecated

Call this method from AsyncTask::onRun (AsyncTask execution thread) to schedule a call to AsyncTask::onProgressUpdate from the main thread with the given progress parameter.

Parameters
mixed$progressA value that can be safely serialize()'ed.

Definition at line 174 of file AsyncTask.php.

◆ reallyDestruct()

pocketmine\scheduler\AsyncTask::reallyDestruct ( )
protectedinherited

Override this to do normal __destruct() cleanup from a child class.

Definition at line 261 of file AsyncTask.php.

◆ reload()

static pocketmine\scheduler\TimingsControlTask::reload ( )
static

Definition at line 42 of file TimingsControlTask.php.

◆ run()

pocketmine\scheduler\AsyncTask::run ( )
inherited

Definition at line 82 of file AsyncTask.php.

◆ setEnabled()

static pocketmine\scheduler\TimingsControlTask::setEnabled ( bool $enable)
static

Definition at line 38 of file TimingsControlTask.php.

◆ setResult()

pocketmine\scheduler\AsyncTask::setResult ( mixed $result)
inherited

Definition at line 127 of file AsyncTask.php.

◆ setSubmitted()

pocketmine\scheduler\AsyncTask::setSubmitted ( )
inherited

Definition at line 145 of file AsyncTask.php.

◆ storeLocal()

pocketmine\scheduler\AsyncTask::storeLocal ( string $key,
mixed $complexData )
protectedinherited

Saves mixed data in thread-local storage. Data stored using this storage is only accessible from the thread it was stored on. Data stored using this method will not be serialized. This can be used to store references to variables which you need later on on the same thread, but not others.

For example, plugin references could be stored in the constructor of the async task (which is called on the main thread) using this, and then fetched in onCompletion() (which is also called on the main thread), without them becoming serialized.

Scalar types can be stored directly in class properties instead of using this storage.

Objects stored in this storage can be retrieved using fetchLocal() on the same thread that this method was called from.

Definition at line 230 of file AsyncTask.php.

Referenced by pocketmine\network\mcpe\auth\ProcessLoginTask\__construct(), pocketmine\network\mcpe\ChunkRequestTask\__construct(), pocketmine\network\mcpe\encryption\PrepareEncryptionTask\__construct(), pocketmine\scheduler\BulkCurlTask\__construct(), pocketmine\scheduler\TimingsCollectionTask\__construct(), pocketmine\world\generator\PopulationTask\__construct(), and pocketmine\world\light\LightPopulationTask\__construct().

+ Here is the caller graph for this function:

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