Threads

From RifidiWiki

Revision as of 23:22, 3 June 2008 by Jochen (Talk | contribs)

Jump to: navigation, search

Rendering and it's threads are now part of our jmonkey plugin:jmeswt
Documentation in this chapter is from now on obsolete!
Designer runs as a combination of eclipse and a 3d engine.
It is very important to closely look where things are going.


Just some rules:

  • GameTaskQueueManager.getInstance().render()/update() can be called from every part of the application and should be used to submit things to the 3d engine.
    It is very important to add and remove nodes inside callables that get submitted to the 3d engine as it might break the software if you don't do it this way.


Old stuff:
IF YOU HAVE BEEN USING THE HELPER CLASS REMOVE THAT CODE AS IT WILL CAUSE A DEADLOCK FROM DESIGNER 1.3 ON!

  • Waiting on Futures: Sometimes it is important to be able to wait on a future when you have submitted a callable. The Helpers class contains a static method called waitOnCallable. This method can be used to wait for a futue to return and is the only way (that I know of) to do this from inside the eclipse thread.
    THIS METHOD IS BLOCKING AND IF CALLED WHEN UPDATETHREAD IS IN THE PAUSEDSTATE WILL BLOCK FOREVER!!


APPARENTLY THIS ISSUE GOT RESOLVED WITH ECLIPSE 3.3!

  • syncExec/asyncExec: Avoid syncExec. According to some newsgroup posts as of eclipse 3.2 there is a deadlock condition that might cause a hang on syncExec. Use asyncExec and a callback.


Personal tools