[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Priority of worker threads.

Although SWT doesn't do this, the Eclipse workbench does increase the UI thread's priority by one (see Workbench.createDisplay). So, if you're writing a plugin to the Eclipse platform, you can follow the convention of setting your background threads to NORM_PRIORITY. The Eclipse jobs API (org.eclipse.core.runtime.jobs) does this for all worker threads it creates.
--


Johan Tibell wrote:
Michael Forster wrote:


I think this is a case of a good reason:

    http://java.sun.com/developer/JDCTechTips/2005/tt0727.html#1

MIke


This was what I had in mind. The java.util.concurrent package creates threads with lower priority than Swing's UI thread (i.e. 5) but since we (by using SWT) run our own UI thread with priority 5 instead of 6 we get the problems associated with inheriting the UI thread's priority anyway.

- Johan