You sure your priorities are of so much more significance than what the person is working on that they justify destroying the concentration of intellectual property creation and forcing a preemption of this other person’s task or reorder of their stack?
If you’re blocked for lack of a task switch, what are you blocking in turn by causing a new interrupt and switch?
Instead of crashing the thread they’re on, why not go to the scheduler and reorder the queue or better re-weight the threading so priorities are worked more optimally?
If in attempting that, you find you run into contention, it could be the most effective overall output is if your task is the one in an occasional wait state.
Being a productive member of a team is about finding balance between what you're personally trying to get done and helping your teammates accomplish their tasks. Like everything else, it's a trade-off.
Your formulation of local vs global optimization of priorities is exactly the correct way to view this problem. My priorities and my colleague's priorities are approximately the same priorities, assuming we're on the same team or on adjacent teams. We are both shipping the same product and serving the same users at the end of the day.
That's why, like everything else in life, the truth lies somewhere in the middle - interrupting someone 10 times a day for trivial stuff you can look up yourself by reading code or documentation is a waste of the other person's time. But wasting four hours running around looking for an answer to a question that your teammate can answer in two minutes is also a waste of time. The end user is not well served by either behavior.
My rule of thumb is 30 minutes. If I can't find an answer in 30 minutes, and I think a teammate knows the answer and can answer immediately, I will ping them or come to their desk.
Obviously you have to read the room. If the teammate you want to bug looks deeply concentrated in what they're doing, they're in the middle of typing, or you ask and they say "sorry I'm in the middle of something, come back in an hour", I'll leave them alone and probably take a break or something. But if they're just back from a coffee break or a meeting, or finished up a discussion with someone else at their desk, there's just no reason to keep banging your head against your desk.
And of course I hold myself to the same standard. Being dismissive to someone who needs your attention is immature. I always assume good intent, and if someone bothers me too often, I just tell them; for some people I will ask they show me what they've already tried. I find this almost always works.
Not saying people shouldn't want to be productive just that understanding delays and simply pyschologically dealing with them would go a long way in modern culture. Not everything needs to happen 5 minutes ago, is late, or is so critical it can't wait a few hours.
being blocked on a task due to missing knowledge isn't really "efficient". Especially when someone can point you to the right place in the span of a single slack message line instead of spending hours wandering through legacy code and still missing the full scope of the change I want to make.
Sure, if it's a one-off bug fix task someone internal discovered, it can wait a day. But these kinds of issues when highlihgted are never because "it happened once" One is coincidence, twice is happenstance. thrice is probably a habit and you learn that certain people aren't a reliable resource in terms of, well, co-working.
This is how you make "progress", by disturbing people who are working?
It's probably for the best that we work different places :-)
I suggest you try to figure it out for yourself first. I can't count the number if times I sent a message, "hey, bla bla," then 5 minutes later I return "never mind." If you can't figure it out, have some respect for the other person's work and time and send an email or message. They will most likely get back to you by the end of the day if not sooner.
Me more important then you right?