From dc51af8b666d690b02ebd7168fd979ee5230cd48 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 19 Apr 2021 14:00:54 +0100 Subject: [PATCH] changelog: mention CancelTaskException addition [ci skip] --- changelogs/4.0-snapshot.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelogs/4.0-snapshot.md b/changelogs/4.0-snapshot.md index 5de84af61..9bab171cb 100644 --- a/changelogs/4.0-snapshot.md +++ b/changelogs/4.0-snapshot.md @@ -770,6 +770,7 @@ This version features substantial changes to the network system, improving coher - `AsyncPool` uses a new, significantly more performant algorithm for task collection. - `BulkCurlTask` has had the `$complexData` constructor parameter removed. - `BulkCurlTask->__construct()` now accepts `BulkCurlTaskOperation[]` instead of `mixed[]`. +- Added `CancelTaskException`, which can be thrown from `Task::onRun()` to cancel a task (especially useful for `ClosureTask`). - `pocketmine\Collectable` has been removed, and is no longer extended by `AsyncTask`. - The following hooks have been added: - `AsyncTask->onError()`: called on the main thread when an uncontrolled error was detected in the async task, such as a memory failure