| Summary: | busyCursorWhile syncExecs in UIThread | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Tod Creasey <Tod_Creasey> |
| Component: | UI | Assignee: | Tod Creasey <Tod_Creasey> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P2 | CC: | cocoakevin, Darin_Swanson |
| Version: | 3.0 | ||
| Target Milestone: | 3.0 RC2 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 64928, 65504 | ||
Why is calling syncExec() from the UI thread an issue? The synchronizer should just call the run method
and return because it's already running in the thread that it needs to be in.
From Synchronizer:
protected void syncExec (Runnable runnable) {
if (display.isValidThread ()) {
if (runnable != null) runnable.run ();
return;
}
...
I am going to investigate - it shouldn't be but it is what was blocking you. This isn't the problem - the problem was that noitification of blockingwas not getting through |
20040608 We are syncExecing in the UIThread - we need to check what Thread we are in before we do this. Here is the patch to do this check Index: ProgressMonitorJobsDialog.java =================================================================== RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressMonitorJobsDialog.java,v retrieving revision 1.20 diff -u -r1.20 ProgressMonitorJobsDialog.java --- ProgressMonitorJobsDialog.java 9 Jun 2004 18:30:53 -0000 1.20 +++ ProgressMonitorJobsDialog.java 9 Jun 2004 21:41:59 -0000 @@ -308,6 +308,12 @@ * Open the dialog in the ui Thread */ private void openDialog() { + //Are we in the UI Thread? + if(Thread.currentThread() == getParentShell ().getDisplay().getThread()){ + if(!alreadyClosed) + open(); + return; + } getParentShell().getDisplay().syncExec(new Runnable(){ /* (non-Javadoc) * @see java.lang.Runnable#run()