Comment
Comment by sunshowers
The big thing is that futures are passive, so any future can be cancelled at any await point by dropping it or not polling it any more. So if you have a situation like this, which in my experience is a very common way to use mutexes:
Then you could cancel the future at the await point in between while the lock is held, and as a result guard.data will not be restored to Some.