The answer can be found in the eclipse source code within the ThreadEventHandler
method. There is a queue of suspended threads, as below:
/**
* Queue of suspended threads to choose from when needing
* to select a thread when another is resumed. Threads
* are added in the order they suspend.
*/
private Set fThreadQueue = new LinkedHashSet();
Further down, every time a breakpoint is hit, the suspended thread is added to this queue:
protected void handleSuspend(DebugEvent event) {
...
queueSuspendedThread(event);
...
}
The method to get the next suspended thread is:
protected synchronized IThread getNextSuspendedThread() {
if (!fThreadQueue.isEmpty()) {
return (IThread) fThreadQueue.iterator().next();
}
return null;
}
So the answer is no, there is no control over the order, it will strictly be in the order that each thread hits the breakpoint and is added to the underlying queue.