Project: SWT
Bug 86562 Can Widget.getDisplay() be called from a background thread?
Reported: 2005-02-24 16:08:24 | Status: resolved fixed

3.1 M5 Widget.getDisplay()'s Javadoc has: <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> But the implementation, at least on Windows, does not check the thread. It seems like this should work from any thread, otherwise it would really complicate the common code pattern: control.getDisplay().asyncExec(...) Can this be used from any thread, or not?

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java