Future: `await` & `async`
This lesson covers the usage of `await` & `async` to fetch results asynchronously using `Future` objects.
We'll cover the following...
In this lesson, you’ll learn to use the await
and async
keywords to carry out asynchronous operations.
The code that uses async
and await
keywords is asynchronous, but it looks appears similar to synchronous code.
In this lesson, you will see a few examples that use await
to wait for the result of an asynchronous function to return before executing the next line of code.
The await
& async
The await
and async
keywords are used together. The function that is expected to perform the expensive work will be marked with the keyword async
. Inside the function, ...