Examveda

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

A. std::spinlock is a blocking synchronization primitive, while std::mutex is a non-blocking synchronization primitive

B. They both provide the same functionality

C. std::mutex is a blocking synchronization primitive, while std::spinlock is a non-blocking synchronization primitive

D. std::spinlock is more efficient than std::mutex

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