Trying to understand when one might use shared_lock over unique_lock or vice versa. The C++ doc is very cryptic! I'm aware that the general guideline is to use lock_guard over the two if we desire immediate, scoped (or RAII) mutual exclusion.
Does this have something to do with condition_variable? I've seen all three being used with this if I recall correct.
I've seen a question on stack overflow that is similar but avoids answering this question here: https://stackoverflow.com/questions/33770500/when-to-use-c11-mutex-lock-unique-lock-shared-lock-etc#:~:text=lock_shared()%20is%20a%20function,the%20end%20of%20the%20scope.