Where have you heard that?
That you pass out and lose consciousness "almost immediately" on emptying your lungs of air, and taking a lungful of inert gas, I saw in a video demonstration of the inert gas method by Betty, from Exit International (the video entitled "Betty and the Helium Method"). This video is no longer online, but I downloaded a copy around 6 years ago. Obviously the helium method is a bit out of date now, since helium sold for party balloons is now mixed with oxygen, to prevent its suicide use. However, I believe the general technique will apply to other inert gases like nitrogen.
In the video, Betty explains that you prepare by placing the exit bag above your head, place the tube from the helium tank into the bag, and pre-fill the bag with helium (see screenshot from the video below). Then she says:
"It is simply a matter of fully exhaling, empty your lungs as much as you can, then hold your breath, and pull the bag full of helium down around your neck. Then take the biggest breath you can, filling your lungs with helium. The sudden replacement of the air in your lungs with helium leads to a precipitous drop in the level of dissolved oxygen in the blood that passes your lungs on its way to the brain, and consciousness is lost almost immediately, within a few breaths. Death follows a few minutes later. Remember it is important to be able to inhale and exhale deeply."
Screenshot From Video "Betty and the Helium Method" by Exit International
It's difficult to tell why it worked so for you, since you didn't describe the exact procedure of displacing oxygen from your lungs and the characteristics of your asphyxiant gas.
Thanks very much for your detailed post.
I was not using an asphyxiant gas, I was just emptying my lungs as much as I could, then closing my mouth and holding my breath, so that I am not taking in any more oxygen. But I find I can hold my breath for 40 seconds without experiencing any loss of consciousness, even when holding my breath with empty lungs.
Whereas if you see what I wrote just above, Betty from Exit International says if you empty your lungs and take in a large lungful of inert gas, "consciousness is lost almost immediately, within a few breaths".
So I am just wondering why consciousness is rapidly lost while you are breathing the inert gas, but is not lost when you hold you breath with empty lungs. But the explanation may be along the lines that Svenhog detailed:
The explanation for this is that you don't empty your lungs completely, there's still some air left. This air contains oxygen, which is why you don't become unconcious directly. When filling your lungs with inert gas, all oxygen is removed.
So maybe even when you empty your lungs as much as your can, there is still some air and oxygen left in the lungs. But when you start breathing the inert gas, perhaps this flushes out the last remaining bits of oxygen from the lungs, leading to rapid loss of consciousness.