Self-Defense is an active Defense for Homicide (note, this is the legal term for taking a life. Criminal Homicide and Justified Homicide are two subsets of Homicide and are denoted by illegal actions and legal actions. Homicide as a result of Self-Defense is a Justified Homicide, regardless of the weapon, so long as it was applied with the minimal amount of force required to stop the criminal harm to oneself).
Suppose you use a taser and the current causes the attacker to go into cardiac arrest and die. Your intention in using the taser was to stop the criminal from injuring yourself, your property, or another person or their property (defense of others). Even though the Taser is non-leathal, it's more like less lethal. Death by Taser is uncommon, but not impossible or rare. It would be handled as a defensive use of a weapon (same as if the attacker was killed by a gun) and processed as such.
Pennsylvania is a Stand Your Ground State, meaning that in a public place, you do not have a duty to flee if your attacker approaches you in a public place, you do not have to prove that you could not flee in order to claim self-defense. However, if you pull a weapon and your attacker decides to flee, you can not give chase and kill him upon capture. You also need to have a reasonable expectation that the attacker is about to use deadly force (this normally means having sight of the weapon or what would reasonably look like a weapon i.e. a realistic toy gun without the orange safety cap would be reasonable). You also cannot claim self-defense if you were engaged in another crime when the attacker approached you (i.e. If you rob the Krusty Krab and the Hash Slinging Slasher approaches you with a knife, sucks to be you cause you don't have a right to be in the Krusty Krab after closing.).