This code is broken, because it will leave the mutex locked when a task fails due to seeing poisoned == true, since the lock guard hasn't be created yet, which will then cause other tasks to block forever on the mutex.

To solve this, I suggest to make die_from_poison a method on MutexArc that unlocks the mutex before calling fail! (that's better than putting an unlock here, since this may get inlined).