Simple read/write lock implementation without starvation
You'd need _shared_mutex and _is_blocked to flip together 'atomically' in order for this code to work, no?
Imaging one thread in lock() just flipped _unique_mutex and before it flips _is_blocked, another thread in lock_shared() is testing _is_blocked.