|
Re: SwingWorker equivalent in SWT [message #459079 is a reply to message #459076] |
Mon, 01 August 2005 12:54 |
Eclipse User |
|
|
|
Originally posted by: sunil_kamath.nohotspammail.com
"Mohit" <mohit.jhawar@gmail.com> wrote in message
news:d654cd64e704fbf4a35be16c85d60645$1@www.eclipse.org...
> Hi All,
>
> I need to put my heavy GUI processes in a separate thread. I heard that
> Swing has a SwingWorker class dedicated for the same. Do SWT also provides
> some or other thing to achieve this cause?
>
SWT only allows UI updates in the UI thread. So I don't know how much use
your separate thread will be- unless it is also a UI thread (in which case
it will use a separate Display, etc., from the main UI thread- which may not
even be allowed by the platform). From the SWT javadocs:
"Applications which are built with SWT will almost always require only a
single display. In particular, some platforms which SWT supports will not
allow more than one active display. In other words, some platforms do not
support creating a new display if one already exists that has not been sent
the dispose() message. "
---
Sunil
|
|
|
|
|
|
|
|
|
Re: SwingWorker equivalent in SWT [message #459145 is a reply to message #459141] |
Tue, 02 August 2005 14:31 |
Eclipse User |
|
|
|
Originally posted by: sunil_kamath.nohotspammail.com
"Mohit" <mohit.jhawar@gmail.com> wrote in message
news:ba2ccc6a71af402488cbd80c0cfa9420$1@www.eclipse.org...
> Thanks a lot Philip. I was actually putting the whole process inside
> syncExec().
>
> :)
Also consider using UIJob.
That way, if two GUI modifications of the same type occur in quick
succession, you can cancel the first UIJob and run just the second one.
---
Sunil
|
|
|
|
Powered by
FUDForum. Page generated in 0.03439 seconds