Examveda

What is the difference between std::async and std::thread in C++ multi-threading?

A. std::async returns a std::future object representing the result of the asynchronous operation, while std::thread does not return anything

B. std::thread allows you to specify the execution policy, while std::async does not

C. std::async creates a new thread and executes a function asynchronously, while std::thread simply creates a new thread

D. std::thread provides more control over thread creation and management compared to std::async

Answer: Option C


Join The Discussion

Related Questions on Multi threading in C plus plus

What is multi-threading in C++?

A. A process that allows parallel execution of tasks

B. A process that allows a single thread to execute

C. A process that allows multiple processes to execute concurrently

D. A process that allows multiple threads to execute concurrently