delay destroying mutex until we are certain to be done with it