Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 141722 Details for
Bug 283596
UIJob can be scheduled, but never run
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed patch
clipboard.txt (text/plain), 3.85 KB, created by
Ian Bull
on 2009-07-15 18:13:16 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Ian Bull
Created:
2009-07-15 18:13:16 EDT
Size:
3.85 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt >Index: src/org/eclipse/rwt/internal/lifecycle/RWTLifeCycle.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt/src/org/eclipse/rwt/internal/lifecycle/RWTLifeCycle.java,v >retrieving revision 1.25 >diff -u -r1.25 RWTLifeCycle.java >--- src/org/eclipse/rwt/internal/lifecycle/RWTLifeCycle.java 4 Jun 2009 11:48:51 -0000 1.25 >+++ src/org/eclipse/rwt/internal/lifecycle/RWTLifeCycle.java 15 Jul 2009 22:12:57 -0000 >@@ -21,6 +21,7 @@ > > import org.eclipse.rwt.internal.AdapterFactoryRegistry; > import org.eclipse.rwt.internal.lifecycle.IPhase.IInterruptible; >+import org.eclipse.rwt.internal.lifecycle.UICallBackManager.RunnableBase; > import org.eclipse.rwt.internal.service.*; > import org.eclipse.rwt.internal.util.ParamCheck; > import org.eclipse.rwt.lifecycle.*; >@@ -110,29 +111,57 @@ > private final class UIThreadController implements Runnable { > public void run() { > IUIThreadHolder uiThread = ( IUIThreadHolder )Thread.currentThread(); >+ UICallBackManager uiCallbackManager = null; > try { > // TODO [rh] consider taking thread from session attribute >- synchronized( uiThread.getLock() ) { >+ synchronized( uiThread.getLock() ) { > uiThread.updateServiceContext(); >- UICallBackManager.getInstance().notifyUIThreadStart(); >+ uiCallbackManager = UICallBackManager.getInstance(); >+ uiCallbackManager.notifyUIThreadStart(); > continueLifeCycle(); > createUI(); > continueLifeCycle(); >- UICallBackManager.getInstance().notifyUIThreadEnd(); >- // TODO [rh] preliminary solution: see >- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=219465 >+ uiCallbackManager.notifyUIThreadEnd(); >+ // TODO [rh] preliminary solution: see >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=219465 > setShutdownAdapter( null ); > } > } catch( final UIThreadTerminatedError e ) { > ( ( ISessionShutdownAdapter )uiThread ).processShutdown(); > } catch( final Throwable thr ) { >- // TODO [rh] preliminary fix for >- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=232289 >- // For a decent solution, see these ideas >- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=219465 >+ // TODO [rh] preliminary fix for >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=232289 >+ // For a decent solution, see these ideas >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=219465 > setShutdownAdapter( null ); > IServiceStateInfo stateInfo = ContextProvider.getStateInfo(); > stateInfo.setAttribute( UI_THREAD_THROWABLE, thr ); >+ } finally { >+ try { >+ >+ // Now that this session is ending, go through all >+ // the remaining runnables and give them a chance to run >+ // They may fail (since we don't have a context anymore), but >+ // this will give them a chance to cleanup. >+ List runnables = uiCallbackManager.runnables; >+ if( runnables != null ) { >+ RunnableBase[] toBeExecuted = new RunnableBase[ runnables.size() ]; >+ runnables.toArray( toBeExecuted ); >+ for( int i = 0; i < toBeExecuted.length; i++ ) { >+ RunnableBase runnable = toBeExecuted[ i ]; >+ if( runnable.canRun() ) { >+ try { >+ runnable.run(); >+ } catch( final Throwable t ) { >+ // Doesn't really matter, we just wanted to give the thread a chance to run >+ } >+ } >+ } >+ } >+ } catch( final Throwable t ) { >+ // Not much we can do now >+ // I guess we could log this! >+ } > } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 283596
:
141679
|
141722
|
147289
|
147290