Richard Maher wrote:
> "Richard Maher" <firstname.lastname@example.org> wrote in message
>> PS. Anyone got a link to this "forthcoming new LiveConnect
> I found this think for those who will also be looking. (I found the bug
> report to be less ambiguous in its terminology, but anyway here's the
While direct from Sun, I'm pretty sure it's incorrect:
single threaded with respect to the web page. The Java language,
however, is inherently multithreaded. If multiple Java threads attempt
any given time. The rest of the threads will wait for one of two
selected for its call to proceed."
sources (hello XMLHttpRequest) and will spawn additional threads of
can be a huge hassle. There's an algorithm available to synchronize
threads using only shared memory. Read on:
Anyway, with regard to Java, I think the best policy is to assume your
JApplet is being accessed in a multithreaded environment and program
including redefining all JApplet methods just to make them synchronized.
(I refuse to redefine the entire JComponent hierarchy, which is huge.
This is one instance where one must just pray that these methods are
never invoked. I don't think there's any way to synchronize a parent
classes methods. Although if you know a specific method will be call
(setSize() is common) synchronize that.)