Asynchronous Programming Flashcards

1
Q

Why do we need to use asynchronous method?

A

To allow a unit of work to run separately from the primary application thread. When completed it notifies the main thread.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What effect does the await keyword have?

A

It suspends the calling method and yields control back to its caller until the awaited task is complete.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What return types are allowed for asynchronous methods?

A

Task and Task

How well did you know this?
1
Not at all
2
3
4
5
Perfectly