diff options
author | adamw <adam@warski.org> | 2017-09-04 17:03:47 +0200 |
---|---|---|
committer | adamw <adam@warski.org> | 2017-09-04 17:03:47 +0200 |
commit | 4b80827ff2aebcf1d88fb55f74f82a1c62075b71 (patch) | |
tree | 6a192f1cadc4de8418a281d5570b22d613d8463f | |
parent | 46ee0318823f79546d2b81722f4c13ecafa65a7e (diff) | |
download | sttp-4b80827ff2aebcf1d88fb55f74f82a1c62075b71.tar.gz sttp-4b80827ff2aebcf1d88fb55f74f82a1c62075b71.tar.bz2 sttp-4b80827ff2aebcf1d88fb55f74f82a1c62075b71.zip |
Docs on cleaning up
-rw-r--r-- | README.md | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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 |