Descartes teached that because he thinks therefor he is. But did he tell something about the question whether there are gaps between thoughts? So probably we could not exist between those gaps? Or wasn't it possible not to think or was thinking just a quality a human posesses?
He doesn't exist because he thinks; rather, thinking is sure evidence of his existence. Sleeping, for example, is not a gap in one's existence, but a gap of being conscious of one's existence. Notice how Descartes himself speaks of it:
"Let us pass, then, to the attributes of the soul. The first mentioned were the powers of nutrition and walking; but, if it be true that I have no body, it is true likewise that I am capable neither of walking nor of being nourished. Perception is another attribute of the soul; but perception too is impossible without the body; besides, I have frequently, during sleep, believed that I perceived objects which I afterward observed I did not in reality perceive. Thinking is another attribute of the soul; and here I discover what properly belongs to myself. This alone is inseparable from me. I am--I exist: this is certain; but how often? As often as I think; for perhaps it would even happen, if I should wholly cease to think, that I should at the same time altogether cease to be. I now admit nothing that is not necessarily true. I am therefore, precisely speaking, only a thinking thing, that is, a mind (mens sive animus), understanding, or reason, terms whose signification was before unknown to me. I am, however, a real thing, and really existent; but what thing? The answer was, a thinking thing." (Meditation I)
Notice that he speaks of "wholly [ceasing] to think" instead of just a lapse in consciousness.
First of all to clarify Pé de Leão point:
I think therefore I am doesn't mean that Descarte thinks that thinking and existing are the same thing. Descartes sees thinking as proof that the mind is different from the body. So "I think therefore I am" should be interpreted as "My thinking is proof that my mind is different than my body (I think), therefore my mind has a separate existence from my body (I am)".
That being said, the fact that there are gaps between thoughts does present a problem for Descartes. One of his main arguments for the difference between mind and body is that the body is divisible, while the mind isn't (The argument from indivisibility):
"the body, by its very nature, is something divisible, whereas the mind is plainly indivisible…[This] consideration alone would suffice to teach me that the mind is wholly different from the body" (Descartes, Meditations on First Philosophy - Meditation VI).
In the synopsis of his meditations, he writes:
"we cannot conceive of half a soul, as we can in the case of any body, however small."
Locke and Hume both criticized the indivisibility argument, see the IEP article on the topic. From their point of view, thoughts are divisible, so either a different basis has to be found for why mind and body are different (Locke), or there is no difference between them (Hume). Hume in particular subscribed to the bundle theory of self, the mind is just an illusion constituted by the collection of memories and sensations that a person experiences.
On the other hand, one can argue that this criticism of Descartes is unfair, since although divisible in time, thoughts are not divisible in space the way bodies are, and that might be what he was alluding to in his indivisibility argument.