Fall back to std::shared_mutex, not std::mutex. Windows users have SRWLOCK. POSIX users have pthread_rwlock_t. I don't know who else is out there, but they should hopefully have std::shared_mutex in 2022. (If not, I'm sure they will tell me.) Change-Id: Ica0def49b0cc58119aa9587f47872ee497d03de3 Reviewed-on: https://code-review.googlesource.com/c/re2/+/59890 Reviewed-by: Perry Lorier <perryl@google.com> Reviewed-by: Paul Wankadia <junyer@google.com>