-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
This section covers how to utilize async functions with tokio.
Example use case: calling an API endpoint to get many requests in parallel.
Structure:
- Define a response struct with serde
- Create an async function to query the endpoint using async reqwest
- Wrapper function to spawn many tasks in parallel second example (https://docs.rs/tokio/latest/tokio/task/fn.spawn.html#examples?)
- create an extendr function with a runtime to evaluate the async function in a blocking context.
This can be taught in a progressive manner as individual sections
Metadata
Metadata
Assignees
Labels
No labels