Can one return to a TCS research job after an excursion to a non-research industry job?
Let me disagree with the other responses.

While there are clearly notable examples of people who can transition to industry and back (see other answers), going to a non-research industrial position, even for a couple years, will make it very hard to return to academia, unless you're already very famous.

The reason is not because academics look down on industry or will think you "impure," but rather that it's very hard to stay active publishing when your job requires all your work time be spent on something else.  And if you haven't published anything for a couple years, it will be nearly impossible to convince a hiring committee to choose you over people who have. (Again, this doesn't apply if you already have a Turing award, etc.)  

But if you can find the time to stay active in research and publish while working in your industry position, then you can still be competitive.  It's just likely to be a losing battle, and your other job responsibilities will realistically probably end up taking priority over research on-the-side.