Questions
Answer the following questions to test your knowledge of this chapter:
- What is concurrency?
- What is the difference between concurrency and parallelism?
- What is a process?
- What’s the difference between a process and a thread?
- Write code to start a thread.
- How could you make the singleton pattern thread-safe?
- Rewrite the
MySingleton
class so that it usesstd::shared_ptr
for the returned instance. - What are coroutines and what is the
co_await
keyword used for?