Difference between revisions of "Threads"

From RifidiWiki

Jump to: navigation, search
Line 4: Line 4:
 
* GameTaskQueueManager.getInstance().render()/update() can be called from every part of the application and should be used to submit things to the 3d engine. <br/> 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.<br/>
 
* GameTaskQueueManager.getInstance().render()/update() can be called from every part of the application and should be used to submit things to the 3d engine. <br/> 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.<br/>
 
<br/>
 
<br/>
* Waiting on Futures: Sometimes it is important to be able to wait on a future when you have submitted a callable. The [http://www.rifidi.org/javadoc/designer/doc/org/rifidi/designer/utils/Helpers.html 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.<br/>THIS METHOD IS BLOCKING AND IF  CALLED WHEN UPDATTHREAD IS IN THE PAUSEDSTATE WILL BLOCK FOREVER!!<br/>
+
* Waiting on Futures: Sometimes it is important to be able to wait on a future when you have submitted a callable. The [http://www.rifidi.org/javadoc/designer/doc/org/rifidi/designer/utils/Helpers.html 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.<br/>THIS METHOD IS BLOCKING AND IF  CALLED WHEN UPDATETHREAD IS IN THE PAUSEDSTATE WILL BLOCK FOREVER!!<br/>
 
<br/>
 
<br/>
 
* 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.
 
* 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.
 
<br/>
 
<br/>

Revision as of 19:13, 7 February 2008

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.


  • 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!!


  • 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