-
Couldn't load subscription status.
- Fork 13
Open
Description
Document the block_on function from the async_std crate, as it has been used frequently in our codebase. The documentation should:
Explain the purpose and usage of block_on.
Provide a Rust code snippet to illustrate its use.
Add inline comments to each block_on call, explaining its necessity in that specific context.
visiual context
use async_std::task;
fn main() {
// `block_on` is used here to run an async function in a synchronous context.
task::block_on(async {
println!("Running an async task synchronously!");
});
}Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
In progress