Hi Karsten,
It is always a good idea to update the scene graph using
Behavior callback (i.e. processStimulus ) instead of
another working thread. This can gaurantee that all
behaviors update will reflect at the same time.
This also make sure that the working thread will not
modify the scene graph attributes (by sending message
in current v1.2 and later design) too fast that the
Java3D thread will not have enough time to handle
all the messages and let it accumulate to the extend
that slow down the entire system. (and exhast the memory)
It is up to the JDK to schedule the priority
of threads. Default thread priority assign by JDK
is used for all Java3D thread unless
VirtualUniverse.setJ3DThreadPriority() is used.
In your case it seems that the working thread has
lower priority than Java3D thread and so JDK did
not schedule the working thread quite often to
modify the scene graph attributes and it appears
that Java3D did not monitor scene graph changes.
- Kelvin
---------------
Java 3D Team
Sun Microsystems Inc.
>Delivered-To: [EMAIL PROTECTED]
>X-Accept-Language: en
>MIME-Version: 1.0
>Content-Transfer-Encoding: 7bit
>Date: Wed, 26 Sep 2001 13:20:13 +0200
>From: Karsten Fries <[EMAIL PROTECTED]>
>Subject: [JAVA3D] Priority conventions???
>To: [EMAIL PROTECTED]
>
>Hi all,
>
>since my project is growing and growing i realized some subtle dependencies of
the
>priorities of my threads to the priorities of the Java3D threads.
>
>As an example:
>i'm updating the scene graph (replacing objects) from a worker thread that runs
>with a lower
>priority than my main thread.
>i made the experience that Java3D didn't monitor scene graph changes when i was
>decreasing
>the workers threads priority under a certain threshold (in that particular case
i
>reduced priority
>by 2).
>The behavior that happend was pretty hard to track down and is perhaps also
>responsible for the
>exception i send around recently.
>
>I would be very interested what the assumptions are concerning thread
priorities.
>Are there any rules or
>guidlines to follow/comply to??
>Something like this could prevent a lot of errors and save even more
development
>time!
>
>Thanks,
>Karsten
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JAVA3D-INTEREST". For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".