Easy to do in training with an unloaded uncocked 1911.
A bit different in real life with real bullets.
Practice at all gives you a better chance than having never practiced.
The weapon is likely to discharge as you grab it, but the idea is to grab it and strike the inner wrist (affecting the nerve system which is involved in carpal tunnel syndrome) ... it is vulnerable where he strikes. If the weapon is a large caliber revolver, the hand grabbing is gonna get burnt, but grab you must, or be the victim. With a semi-auto the hand will be injured when the gun discharges, but grab you must, or be a victim.