Ensure MVar usage is exception-safe.