AsyncTask: deprecate progress update related stuff

This commit is contained in:
Dylan K. Taylor 2024-12-05 12:57:26 +00:00
parent 9a6e258b6c
commit 35a90d24ec
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -68,7 +68,10 @@ abstract class AsyncTask extends Runnable{
*/
private static array $threadLocalStorage = [];
/** @phpstan-var ThreadSafeArray<int, string>|null */
/**
* @phpstan-var ThreadSafeArray<int, string>|null
* @deprecated
*/
private ?ThreadSafeArray $progressUpdates = 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
* {@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
*/
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.
* All {@link AsyncTask::publishProgress} calls should result in {@link AsyncTask::onProgressUpdate} calls before
* {@link AsyncTask::onCompletion} is called.