Nearly, twice, and a third time was a false alarm, but there was a young lady and her 2 year old son to protect. Once with my .45, the other two with a .38 Chief's Special. The .45 incident I was hand on gun and about to draw when they ran for it. Four of them, three of us, I was armed my two friends were not. The four guys were arrested (three of them at least) the next week in the same car they were in for a fatal driveby. Another ten seconds and I'm guessing fire would have been exchanged.
Carry what you can hit fast and accurately with. For me, that's a .45, but I've seen as a news photographer people get killed with 9mm, .380, .40, .45 and .357, as well as knives. Sometimes hollowpoints helped, other times ball ammo did the trick with good shot placement (bad in the victim's point of view). I've also seen bad shot placement mean the guy keeps going after four hits to the leg or arm or grazes.
Occasionally there's a real motivated type, like a bank robber who was hit twice center mass by .40 JHPs and was still struggling after three large (six foot, 200+ lb) cops were on top of him.
So shoot accurately, shoot fast, and KEEP SHOOTING till the guy hits the dirt.