Gerald Gutierrez wrote:
> > > Well that illustrates my point. A developer should not have to do that.
> > > The Swing team should provide the queue interface it should not have to be
> > > cobbled together by every developer that wants to write a complex graphics
> > > program.
> > > I never had any problems with Display Postscript under Nextstep. The
> > > interface was very easy to use and multi threaded drawing was much
> > > easier to implement.
> > > Just fill a message buffer and send it. The locking is at the message level.
>
> Are you sure ? The UI libraries of NeXTSTEP are not threadsafe, and it
> was strongly encouraged that the UI be accessed by only one thread.
> Interaction with the UI via multiple threads often yielded strange
> results. This is the primary reason why there are so many
> "MultiThreadedApp" objects around. These things used to buffer UI
> requests from child threads, and release them to be executed when the
> main thread is scheduled and executing so that conflicts would not
> occur.
>
> To clarify, I mean NeXTSTEP in terms of the 3.x versions, not OPENSTEP.
Short answer the UI used a single DPSContext you were free to create as many as
you wanted. Thre creation is expensive
I never used more than two.
The Contexts were individually thread safe. So you can eather create a new Context
or manage your default one.
You were gasp given a choice.
Alos to Dan Kegel I noted privatley that invoke later allowed my stuff to at least
work.
Unfortuntley when you drag a window wich uses invokelater from drawing the
Components can be drawn
before the window so its just a work around not a fix. Having the Window chase its
panels is only mildly amusing.
Mike