Mutex with infinite immut ref but only 1 mut ref?

I was just wondering if anyone knows if there is a Mutex like struct which allows you to take as many immutable references so long as there is no active mutable references, and only one mutable reference as long as there is no active immutable reference. If not, is there anything which might fill a similar role?

Are you looking for RwLock?

1 Like

Yes thank you so much!