educative.io

How std::mutex supports try_lock_shared

In the table it shows a std::mutex supports try_lock_shared. Is it a typo? I could not find it in here std::mutex - cppreference.com


Course: https://www.educative.io/courses/concurrency-with-modern-cpp
Lesson: https://www.educative.io/courses/concurrency-with-modern-cpp/R1JVmXVWvVK

Hi @Aditya_Sharma, you’re right. According to the latest C++ standard documentation, std::mutex indeed does not support try_lock_shared() . The try_lock_shared() method is associated with std::shared_mutex , which provides shared ownership functionality.

This has been fixed in the lesson as well.