Examveda

What is the difference between std::mutex and std::recursive_mutex in C++ multi-threading?

A. std::mutex can be locked multiple times by the same thread, while std::recursive_mutex cannot

B. std::recursive_mutex can be locked multiple times by the same thread, while std::mutex cannot

C. std::mutex cannot be locked multiple times by the same thread, while std::recursive_mutex can

D. They both provide the same functionality

Answer: Option B


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