>> Java doesn't multitask threads very effectively
>Two problems with this statement: "Java" doesn't multitask
>efficiently? At best, "the JDK" or "currently available JDK's",
>because I haven't seen anything in the JLS or JVM spec that would
>hamper efficient multithreading.
Sorry, this is a pet topic of mine. I didn't say "efficient", I said
"effective". The Java threading model, as specified, is quite weak.
There is no way to stop a thread. There's barely any way to manage
relative thread priorities (the mechanism that's there does not work
very well). There's not even a guarantee of preemptive multitasking.
>Second, what's wrong with native threads at the moment? It seems to
>me to work just fine. Is your statement not related to green threads?
Native threads on Linux take care of the preemption problems. But
you're relying on behaviour that's outside of spec. Green threads work
reasonably well, too, probably better if you're using lots of threads.
All of this was advice to someone doing a multi-agent system in Java.
I've been doing one myself for the past 18 months. It works OK, but it
would work a lot better if I had more control over threading.
With apologies for the peripherally Linux related post,
Nelson
[EMAIL PROTECTED]
. . . . . . . . http://www.media.mit.edu/~nelson/
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]