Summary: | Some (a)syncExec(Supplier<T> provider) in Display class | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Mickael Istria <mistria> |
Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | akurtakov, ericwill, loskutov, xixiyan |
Version: | 4.8 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Mickael Istria
2018-09-07 13:24:40 EDT
Can you give a sample snippet how do you imagine it ? From non-UI Thred: Color backgroundColor = control.getDisplay().asyncExec(() -> control.getBackground()); (In reply to Mickael Istria from comment #2) > From non-UI Thred: Color backgroundColor = control.getDisplay().asyncExec(() > -> control.getBackground()); Not sure I can follow. If it waits here and get a Color, it is not an asyncExec(). Or it gets a Future<Color>, but then it needs to call future.get() for the Color and will be again not async. The Display.syncExec(Supplier<T>) should return a T The Display.asyncExec(Supplier<T>) should return a CompletableFuture<T> |