aboutsummaryrefslogtreecommitdiff
path: root/examples/async-task.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/async-task.rs')
-rw-r--r--examples/async-task.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/async-task.rs b/examples/async-task.rs
index 780bc081..e1ab1432 100644
--- a/examples/async-task.rs
+++ b/examples/async-task.rs
@@ -27,6 +27,7 @@ mod app {
hprintln!("init");
async_task::spawn().unwrap();
+ async_task_args::spawn(1, 2).unwrap();
async_task2::spawn().unwrap();
(Shared { a: 0 }, Local {})
@@ -53,6 +54,11 @@ mod app {
hprintln!("hello from async");
}
+ #[task]
+ async fn async_task_args(_cx: async_task_args::Context, a: u32, b: i32) {
+ hprintln!("hello from async with args a: {}, b: {}", a, b);
+ }
+
#[task(priority = 2, shared = [a])]
async fn async_task2(cx: async_task2::Context) {
let async_task2::SharedResources { a: _, .. } = cx.shared;