I have been experimenting with thread priorities in the various versions of Java for the Windows, Mac and Linux platforms. It seems that Windows and Mac will honor the priority set on a thread, the Linux platform will not.
Has anyone experienced this problem, or have an explanation why it does not work?
Originally posted by Ulf Dittmer: Welcome to JavaRanch.
I only have fuzzy knowledge on the topic myself, but I seem to recall that the recommended best practice was to avoid changing thread priorities, and leave it up to the JVM which thread to run.
But how does the JVM know which thread is more important? It doesn't. It would give equal precedence to my important calculation and some background clean-up task.
So priorities are a useful feature, I think. I certainly use them for background tasks. I admit that I have only actually checked whether they really run at reduced priority on Windows and maybe Mac OS X.
Unix/Linux certainly does have prioritisation, but does anyone know whether the Java threads can take advantage of it? The original poster is suggesting not.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.