It is infinite. Generations and generations will come with people's experience and matter of reasoning will be the key of thinking infinitely. While we are not assured life will be long lasting for humans, the way our brain works are the typical reason that we question a lot of things.
The thought of questioning too is a big revelation that it comes infinitely. We can even make question out of small things.
The only loophole in this question is that life is uncertain. I don't have any idea if we get extinct or not. But if given the chance to live longer, then there's no question of unlimited thinking.