The lock and borrow API's for embassy_sync's blocking Mutex and ThreadModeMutex types provide only shared references to their inner data. Shouldn't they provide mutable references to provide interior mutability? Why are their API's different from the async mutexes?
I see that the critical_section crate's Mutex also does not provide interior mutability, but their documentation makes that fact and the reasoning explicit whereas the documentation for embassy_sync's blocking mutex implies that it provides interior mutability.
The
lock
andborrow
API's for embassy_sync's blockingMutex
andThreadModeMutex
types provide only shared references to their inner data. Shouldn't they provide mutable references to provide interior mutability? Why are their API's different from the async mutexes?