mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
note that late resources must be Send
This commit is contained in:
parent
77def32454
commit
c4bad51deb
1 changed files with 5 additions and 0 deletions
|
@ -39,6 +39,11 @@ The example below shows where a type that doesn't implement `Send` can be used.
|
||||||
{{#include ../../../../examples/not-send.rs}}
|
{{#include ../../../../examples/not-send.rs}}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
It's important to note that late initialization of resources is effectively a
|
||||||
|
send operation where the initial value is sent from `idle`, which has the lowest
|
||||||
|
priority of `0`, to a task with will run with a priority greater than or equal
|
||||||
|
to `1`. Thus all late resources need to implement the `Send` trait.
|
||||||
|
|
||||||
## `Sync`
|
## `Sync`
|
||||||
|
|
||||||
Similarly, [`Sync`] is a marker trait for "types for which it is safe to share
|
Similarly, [`Sync`] is a marker trait for "types for which it is safe to share
|
||||||
|
|
Loading…
Reference in a new issue