I minimise the impact of unexpected context switches by keeping a running log what I am doing or should do next in a document for each project. It might seem like a waste of time but I can safely mentally let the whole current context go when I am interrupted for an urgent job and I don't have to keep a stack of contexts in my head at once. It is especially useful in getting back up to speed in a context that had to be ignored for a week or more.