| Summary: | Display#getSyncThread() is missing | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Dmitry Pryadkin <drpadawan> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | drpadawan |
| Version: | 1.0 | ||
| Target Milestone: | 1.3 M7 | ||
| Hardware: | All | ||
| OS: | All | ||
| URL: | http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.technology.rap/msg03766.html | ||
| Whiteboard: | |||
|
Description
Dmitry Pryadkin
Not sure if this will make it into 1.2
But from what I understand, it should be easy to work around the missing method in both RCP and RAP:
final Thread syncThread = Thread.currentThread();
display.syncExec( new Runnable() {
public void run() {
System.out.println( "syncThread: " + syncThread );
// do something in UI thread
}
} );
Indeed it's easy. However in my case I have to check Jobs in JobManager and take decisions if a job is locked on UIThread. (In reply to comment #2) > [ ... ] > However in my case I have to check Jobs in JobManager and take decisions if a > job is locked on UIThread. I don't quite understand. Does that mean that the proposed workaround doesn't work for you? If so, why? The actual getSyncThread() implementation wouldn't do differently. (In reply to comment #3) > I don't quite understand. Does that mean that the proposed workaround doesn't > work for you? If so, why? The proposed workaround is not applicable to my case. final Job [] jobs = jobManager.find(connection); for (Job job : jobs) { final Thread thread = job.getThread(); if (thread != null && thread == currentDisplay.getSyncThread()) { // job is currently running and is locking the currentDisplay } } > The actual getSyncThread() implementation wouldn't do differently. > I don't argue. Implemented in CVS HEAD. |