mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 20:07:09 +00:00
AsyncTask: deprecate progress update related stuff
This commit is contained in:
parent
9a6e258b6c
commit
35a90d24ec
@ -68,7 +68,10 @@ abstract class AsyncTask extends Runnable{
|
|||||||
*/
|
*/
|
||||||
private static array $threadLocalStorage = [];
|
private static array $threadLocalStorage = [];
|
||||||
|
|
||||||
/** @phpstan-var ThreadSafeArray<int, string>|null */
|
/**
|
||||||
|
* @phpstan-var ThreadSafeArray<int, string>|null
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
private ?ThreadSafeArray $progressUpdates = null;
|
private ?ThreadSafeArray $progressUpdates = null;
|
||||||
|
|
||||||
private ThreadSafe|string|int|bool|null|float $result = null;
|
private ThreadSafe|string|int|bool|null|float $result = null;
|
||||||
@ -161,6 +164,8 @@ abstract class AsyncTask extends Runnable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
* Call this method from {@link AsyncTask::onRun} (AsyncTask execution thread) to schedule a call to
|
* Call this method from {@link AsyncTask::onRun} (AsyncTask execution thread) to schedule a call to
|
||||||
* {@link AsyncTask::onProgressUpdate} from the main thread with the given progress parameter.
|
* {@link AsyncTask::onProgressUpdate} from the main thread with the given progress parameter.
|
||||||
*
|
*
|
||||||
@ -175,6 +180,7 @@ abstract class AsyncTask extends Runnable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @deprecated
|
||||||
* @internal Only call from AsyncPool.php on the main thread
|
* @internal Only call from AsyncPool.php on the main thread
|
||||||
*/
|
*/
|
||||||
public function checkProgressUpdates() : void{
|
public function checkProgressUpdates() : void{
|
||||||
@ -187,6 +193,8 @@ abstract class AsyncTask extends Runnable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
* Called from the main thread after {@link AsyncTask::publishProgress} is called.
|
* Called from the main thread after {@link AsyncTask::publishProgress} is called.
|
||||||
* All {@link AsyncTask::publishProgress} calls should result in {@link AsyncTask::onProgressUpdate} calls before
|
* All {@link AsyncTask::publishProgress} calls should result in {@link AsyncTask::onProgressUpdate} calls before
|
||||||
* {@link AsyncTask::onCompletion} is called.
|
* {@link AsyncTask::onCompletion} is called.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user