This has happened to me for as long as I have used Macs, I think.
Occasionally, Mac OS X remembers a long-forgotten disk, sometimes external, sometimes internal, and spins it up for some reason. And every time this happens, the front-most application, the one I am using at that moment, hangs until the disk has spun up.
Why does that happen and can I tell OS X that the application in focus ought to have priority over hard disks? (Note that it is not the boot hard disk with the swap file that is being spun up.)