Re: Help Me!

From: Alex Molochnikov (NOBODY_at_NO.SPAM)
Date: 10/04/03


Date: Sat, 04 Oct 2003 04:44:33 GMT


"James" <jamestthomas@comcast.net> wrote in message
news:OJlfb.487999$Oz4.331841@rwcrnsc54...
> Just off the cuff, I thought the thread doing the calculations should
> sleep() at intervals to allow the Gui to respond. Or, since I hardly do
> Swing but heard this, is that one of the issues with swing, the each share
> the same thread? If they don't, another approach is setting priorities on
> the threads but that is so unpredictable it is probably not worth trying
as
> much as the first thing I mentioned with calculations and sleep()
intervals.

In my experience, the behavior of threads with different priorities id fully
predictable. One of my apps had a thread that updated a GUI. The update
worked, but was quite jerky, with a number of updates buffered up before
showing them. Lowering priority of the updating thread fixed the problem.
This effect was observed on Windows (98, NT, 2K and XP).

Just my $0.02

Alex Molochnikov
Gestalt Corporation



Relevant Pages

  • Re: Help Me!
    ... I thought the thread doing the calculations should ... > sleep() at intervals to allow the Gui to respond. ... the behavior of threads with different priorities id fully ... One of my apps had a thread that updated a GUI. ...
    (comp.lang.java.gui)
  • Re: Help Me!
    ... I thought the thread doing the calculations should ... >> sleep() at intervals to allow the Gui to respond. ... another approach is setting priorities ... One of my apps had a thread that updated a GUI. ...
    (comp.lang.java.gui)
  • Re: Help Me!
    ... sleepat intervals to allow the Gui to respond. ... Swing but heard this, is that one of the issues with swing, the each share ... much as the first thing I mentioned with calculations and sleep() intervals. ...
    (comp.lang.java)
  • Re: Help Me!
    ... sleepat intervals to allow the Gui to respond. ... Swing but heard this, is that one of the issues with swing, the each share ... much as the first thing I mentioned with calculations and sleep() intervals. ...
    (comp.lang.java.gui)
  • Re: Help Me!
    ... I thought the thread doing the calculations should ... >> sleep() at intervals to allow the Gui to respond. ... another approach is setting priorities ... One of my apps had a thread that updated a GUI. ...
    (comp.lang.java)