1
0
mirror of https://github.com/actix/actix-website synced 2025-06-27 07:29:02 +02:00

prettier markdown

This commit is contained in:
Rob Ede
2023-11-01 15:28:34 +00:00
parent 7c4b52623e
commit 0d0e7f4433
17 changed files with 77 additions and 208 deletions

View File

@ -49,6 +49,7 @@ and register the data in an `App`:
<CodeBlock example="application" file="mutable_state.rs" section="make_app_mutable" />
Key takeaways:
- State initialized _inside_ the closure passed to `HttpServer::new` is local to the worker thread and may become de-synced if modified.
- To achieve _globally shared state_, it must be created **outside** of the closure passed to `HttpServer::new` and moved/cloned in.