This is a great point, and something I struggle with. Although, I think it combines the problem of focus as well.
While waiting for my project to compile and start, I switch to my browser, get lost in HN or e-mail and 5 or 10 min later forget what I was doing in the first place. When this happens several times a day, it becomes a real problem.
This is one of my biggest problems. When compilation, image creation, or device flashing takes longer than ~1 minute, then I will switch to the browser and get lost. 15-30 minutes later I will discover that my build, flash file, whatever was done, and will resume work (and feel really bad about it).
Interesting. I try to keep a newspaper or periodical handy, something offline and inert. While my project compiles, I read a few hundred words and do not get so engrossed I lose my original train of thought.
I think my colleagues would start to look even more funnily at me than the already do if I started doing this. Especially since we work in an open office environment. If I had an office I would definitely consider.
There's definitely a place where it gets too extreme. I've caught myself going to check IMs and emails while a page loads in the browser. I pause in my writing at the end of a sentence and I flick my gaze over to check for new mail.
I think the point at which you can switch is when you can honestly expect to give the thing you are switching to your full attention until it is complete. So sure, go answer a few emails during a compile, but only check for the compile to be done in between emails.
If it's just reading HN I could see this, but I don't think it's a good solution. The very problem we have is too many notifications. Whether they are mail or test suites, they interrupt you and take your focus, even briefly, away from what you're currently doing.
I turn off notifications on mail, Skype chat, IRC, etc. If it's not more important than the other things I might be doing, it doesn't get to interrupt me.
While waiting for my project to compile and start, I switch to my browser, get lost in HN or e-mail and 5 or 10 min later forget what I was doing in the first place. When this happens several times a day, it becomes a real problem.