Skip to content

Commit ed81420

Browse files
committed
rust: async: workqueue: simplify examples
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent 3c77946 commit ed81420

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

rust/kernel/kasync/executor/workqueue.rs

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -177,19 +177,16 @@ struct ExecutorInner {
177177
/// use kernel::spawn_task;
178178
/// use kernel::workqueue;
179179
///
180-
/// fn example_shared_workqueue() -> Result {
181-
/// let mut handle = Executor::try_new(workqueue::system())?;
182-
/// spawn_task!(handle.executor(), async {
183-
/// pr_info!("First workqueue task\n");
184-
/// })?;
185-
/// spawn_task!(handle.executor(), async {
186-
/// pr_info!("Second workqueue task\n");
187-
/// })?;
188-
/// handle.detach();
189-
/// Ok(())
190-
/// }
180+
/// let mut handle = Executor::try_new(workqueue::system())?;
181+
/// spawn_task!(handle.executor(), async {
182+
/// pr_info!("First workqueue task\n");
183+
/// })?;
184+
/// spawn_task!(handle.executor(), async {
185+
/// pr_info!("Second workqueue task\n");
186+
/// })?;
187+
/// handle.detach();
191188
///
192-
/// # example_shared_workqueue().unwrap();
189+
/// # Ok::<(), Error>(())
193190
/// ```
194191
pub struct Executor {
195192
queue: Either<BoxedQueue, &'static Queue>,

0 commit comments

Comments
 (0)