From 8ac4c9bd0086825383bddbce2fa1cd27b85c9c32 Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Mon, 4 Apr 2022 11:45:59 +0200 Subject: [PATCH] Make documentation consistent --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 69a20ba..762c59c 100644 --- a/README.md +++ b/README.md @@ -316,7 +316,7 @@ val result: Future[Int] = retryWithBackOff(5, 5.seconds) { } ``` -### CancelableFuture +### Cancelling Future's - [markatta.futiles.CancellableFuture](src/main/scala/markatta/futiles/CancellableFuture.scala) If you need to create a ```Future``` that you want to cancel at a later point in time then you can use a `CancelableFuture`. @@ -337,3 +337,6 @@ it also does not handle cleaning up of resources (such as file handles) since fu computations deriving from `.map`/`.flatMap`/`onComplete` may not execute. If a `CancelableFuture` was cancelled this way it will fail with a `CancellationException` exception. + +Note that `CancellableFuture` implements the `scala.concurrent.Future` interface which +means you can also use it as a standard `Future`.