getCancellation(); * * $response = $httpClient->request("https://example.com/pipeline", $cancellation); * $responseBody = $response->getBody(); * * while (null !== $chunk = $response->read()) { * // consume $chunk * * if ($noLongerInterested) { * $deferredCancellation->cancel(); * break; * } * } * ``` * * @see Cancellation * @see CancelledException */ final class DeferredCancellation { use ForbidCloning; use ForbidSerialization; private readonly Internal\Cancellable $source; private readonly Cancellation $cancellation; public function __construct() { $this->source = new Internal\Cancellable; $this->cancellation = new Internal\WrappedCancellation($this->source); } public function __destruct() { $this->source->cancel(); } public function getCancellation(): Cancellation { return $this->cancellation; } public function isCancelled(): bool { return $this->source->isRequested(); } /** * @param \Throwable|null $previous Exception to be used as the previous exception to CancelledException. */ public function cancel(?\Throwable $previous = null): void { $this->source->cancel($previous); } } __halt_compiler();----SIGNATURE:----ObGe+/ex+I7htFOXcwWNEYK7HnWXwB5DCAEDhTuWKFvvx1Q816zHlrAIFgu6Cdklcmyq/ODjTpDb3UFxV33bn9SxtfPz4MZPoMjTyWURoYlk4w/CkmBU4sbyibrZB7pTyR5EOHl7oB2TpZwfJdnJzVdSUmmQ5voYkV58/H51T1pTAC+qu4q3ywh/3SbVFh1stiy0mVZPp5UNXP3JPzrFMh5DPR15FBha7f0q6IfO2nFVtchphgQhAOcn8VDXwHQs/4zQS+lX8egWbf8Sh360O5EeJRjKboCCsOR/YTdkRgGyV9X8fzSEmDnzoNXCw6Ulv7EOlu6sgtgKqLUVwa9mITwmK2UXYXmTCuRa2LO9wy/AqL3qJgxqPrtPiIYjl/DDx+qeiEaR6unC/qVQbkksX3HsCean3wj843CDZnPoWQpU3u8yKZfeyizEZrrK0EK2hAwmHyzW16ku55uOukfUJbYfDVK89RZYwt63YALrDUezY4xDlVRbhegWqxeV3/MH3J9ReqlvQYIC9df7+KjxrLxOrl9E/dOFWlYkEHBFqI3nsy18WYIwtgBEGMWvlxA1PPg28B4y2cTyGOpPtq34Y3Haxbs5IFl4QhMTB8G4Hzzfj7+oZ3WauNu9d2e7BW/krsnfCwXPDlWMQZwF4o9fqCsYXX4CEoIltqista/UFI0=----ATTACHMENT:----NDIzMzU4NjE1ODg4NzkzNCA1NzY5MjYzMjIyNTg0MDA5IDQ2NDM3MTY3MTU4NjA5OTE=