aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authoradamw <adam@warski.org>2017-09-04 17:03:47 +0200
committeradamw <adam@warski.org>2017-09-04 17:03:47 +0200
commit4b80827ff2aebcf1d88fb55f74f82a1c62075b71 (patch)
tree6a192f1cadc4de8418a281d5570b22d613d8463f /README.md
parent46ee0318823f79546d2b81722f4c13ecafa65a7e (diff)
downloadsttp-4b80827ff2aebcf1d88fb55f74f82a1c62075b71.tar.gz
sttp-4b80827ff2aebcf1d88fb55f74f82a1c62075b71.tar.bz2
sttp-4b80827ff2aebcf1d88fb55f74f82a1c62075b71.zip
Docs on cleaning up
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index 5ee302c..741c0c9 100644
--- a/README.md
+++ b/README.md
@@ -177,6 +177,18 @@ uri"$scheme://$subdomains.example.com?x=$vx&$params#$jumpTo"
// https://sub1.sub2.example.com?x=y+z&a=1&b=2#section2
```
+## Cleaning up
+
+When ending the application, make sure to call `handler.close()`, which will
+free up resources used by the backend (if any). The close process might be
+asynchronous, and can complete only after the `close()` method returns.
+
+Note that only resources allocated by the handlers are freed. For example,
+if you use the `AkkaHttpHandler()` the `close()` method will terminate the
+underlying actor system. However, if you have provided an existing actor system
+upon handler creation (`AkkaHttpHandler.usingActorSystem`), the `close()`
+method will be a no-op.
+
## Supported backends
### Summary