Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] setVisible(true) from a worker thread


It's a mistake to look at the implemenation of Windows and then try to apply what you see there to the other platforms.



Reshat Sabiq <sabiq@xxxxxxxxxxxx>
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

04/13/2006 02:27 PM

Please respond to
"Eclipse Platform SWT component developers list."

To
platform-swt-dev@xxxxxxxxxxx
cc
Subject
[platform-swt-dev] setVisible(true) from a worker thread





I know that it throws, and that it must be called from the UI thread
that instantiated the window, but i'm trying to understand why this
restriction exists. Doesn't this method send a message like WM_SHOWWINDOW
on Windows to the thread that created the window behind the scenes? Or
does it change the window state and the message loop is notified of
the change that has already been processed (is this synchronous or
asynchronous?), while the window state change is processed
synchronously on the calling thread?

Given that there is no restriction on which thread calls ShowWindow on
Windows, why does setVisible have to be called on the UI thread in SWT?

I'm just trying to understand the implementation a little better.

Thanks.

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top