File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
examples/lm3s6965/examples Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ mod app {
1717 #[ init]
1818 fn init ( _cx : init:: Context ) -> ( Shared , Local ) {
1919 task1:: spawn ( ) . unwrap ( ) ;
20- //task2::spawn(Default::default()).ok(); <--- This is rejected since it is a local task
20+ //task2::spawn(Default::default()).ok(); <--- This is rejected since not all args are Send and Sync
2121 ( Shared { } , Local { } )
2222 }
2323
@@ -27,7 +27,8 @@ mod app {
2727 cx. local_spawner . task2 ( Default :: default ( ) ) . unwrap ( ) ;
2828 }
2929
30- #[ task( priority = 1 , local_task = true ) ]
30+ // Task where some args are !Send/!Sync
31+ #[ task( priority = 1 ) ]
3132 async fn task2 ( _cx : task2:: Context , _nsns : NotSendNotSync ) {
3233 hprintln ! ( "Hello from task2!" ) ;
3334 debug:: exit ( debug:: EXIT_SUCCESS ) ; // Exit QEMU simulator
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ mod app {
2828 fn init ( cx : init:: Context ) -> ( Shared , Local ) {
2929 Mono :: start ( cx. core . SYST , 12_000_000 ) ;
3030
31- incrementer:: spawn ( cx. local . wait_queue ) . ok ( ) . unwrap ( ) ;
32- waiter:: spawn ( cx. local . wait_queue ) . ok ( ) . unwrap ( ) ;
31+ incrementer:: spawn ( & * cx. local . wait_queue ) . ok ( ) . unwrap ( ) ;
32+ waiter:: spawn ( & * cx. local . wait_queue ) . ok ( ) . unwrap ( ) ;
3333
3434 let count = 0 ;
3535
You can’t perform that action at this time.
0 commit comments