This thread hasn't had anything to do with Linux. I'd really prefer to
keep non-Linux discussion off this list. However, I'll now gamely try
to bring this back to a java-linux discussion -

>Have a method, such as stop(), that sets a boolean, and in the thread
>that's running, have it loop testing if the boolean has been set by
>stop() or not, and if so, then exit itself.

Right. But what if the thing running the thread you're trying to stop
is hostile or buggy and you can't count on it to check that flag? Are
there any low-level "terminate" type methods left in 1.2?

>Stopping a thread otherwise is problematic because it is not clear where it
>was when it was stopped (it's an ugly stop).

The story I've been told when they deprecated Thread.stop() in 1.1 is
they couldn't guarantee that monitors were released correctly with
Thread.stop(). So rather than fix the VM, they took it out of Thread.
Maybe there's a problem with the spec.


All this is just to say that Java's threading model is severely
broken. The JVM is about 3/4 of an OS. But it's missing a crucial
part, a decent threading model. Hence, my Linux-related point -

Wouldn't it be wonderful if we were allowed to hack up Sun's reference
implementation, to add in better threading support and donate that
code back to Sun for consideration and inclusion into the standard
Java? They don't need to be afraid of us polluting the language (a la
Microsoft) because we'd do it all open and free.

My understanding is that the new Linux licensing stuff has been
carefully written to not allow this sort of extra access to the
system. Is that true?

(Another example - some folks presented a really nice piece of work at
OOPSLA, adding per-thread memory and CPU usage accounting to Java.
Stop denial of service attacks from applets! But they had to hack it
all in to an opaque JVM (Microsoft's) without any support from the VM
itself, because the VM is closed. Ick! Useful work is being impeded by
the closed nature of Java implementations.)

                                                  [EMAIL PROTECTED] 
.       .      .     .    .   .  . . http://www.media.mit.edu/~nelson/ 

Reply via email to