mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 05:45:19 +01:00
Add multilock to the book
This commit is contained in:
parent
243668df54
commit
d079949139
2 changed files with 9 additions and 1 deletions
|
|
@ -64,6 +64,14 @@ $ cargo run --example lock
|
|||
{{#include ../../../../ci/expected/lock.run}}
|
||||
```
|
||||
|
||||
## Multi-lock
|
||||
|
||||
As an extension to `lock`, and to reduce rightward drift, locks can be taken as tuples. The following examples shows this in use:
|
||||
|
||||
``` rust
|
||||
{{#include ../../../../examples/multilock.rs}}
|
||||
```
|
||||
|
||||
## Late resources
|
||||
|
||||
Late resources are resources that are not given an initial value at compile time using the `#[init]` attribute but instead are initialized at runtime using the `init::LateResources` values returned by the `init` function.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue