aboutsummaryrefslogtreecommitdiff
path: root/book/en/src/by-example/message_passing.md
blob: b80ae03cde2c4afbfd0159ec25d9ad79b6584f60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Message passing & capacity

Software tasks have support for message passing, this means that they can be spawned with an argument
as `foo::spawn(1)` which will run the task `foo` with the argument `1`. The number of arguments is not
limited and is exemplified in the following:

``` rust
{{#include ../../../../examples/message_passing.rs}}
```

``` console
$ cargo run --target thumbv7m-none-eabi --example message_passing
{{#include ../../../../ci/expected/message_passing.run}}
```