Practicing and exploring
Test your knowledge and understanding by answering some questions, get some hands-on practice, and explore this chapter's topics with deeper research.
Exercise 12.1 – test your knowledge
Answer the following questions:
- By convention, what suffix should be applied to a method that returns
Task
orTask<T>
? - To use the
await
keyword inside a method, what keyword must be applied to the method declaration? - How do you create a child task?
- Why should you avoid the
lock
keyword? - When should you use the
Interlocked
class?
Exercise 12.2 – explore topics
Use the following links to read more about this chapter's topics:
- Threads and threading: https://msdn.microsoft.com/en-us/library/6kac2kdh(v=vs.110).aspx
- Task parallelism (task parallel library): https://msdn.microsoft.com/en-us/library/dd537609(v=vs.110).aspx
- await (C# reference): https://msdn.microsoft.com/en-GB/library/hh156528.aspx
- Asynchronous Programming with Async and Await (C# and Visual Basic): https...