I'm building a thread-safe shared state with MVar and due to requirements I need some fairness guarantees (If two threads asked a state under MVar one after the other then as soon as the state is available the threads will take it in the order they asked for it).
I didn't find any note in the MVar documentation.
So in case of fairness guarantees is it required to build some sort of a wrapper of ReentrantLock(true) fair lock?