Examveda

What is the difference between std::condition_variable and std::condition_variable_any in C++ multi-threading?

A. std::condition_variable is more efficient than std::condition_variable_any

B. std::condition_variable_any can work with any mutex type, while std::condition_variable can only work with std::mutex

C. std::condition_variable can only work with std::mutex, while std::condition_variable_any can work with any mutex type

D. std::condition_variable_any is more efficient than std::condition_variable

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