User Tools

Site Tools


gamedev:parallelprocessing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
gamedev:parallelprocessing [2019/05/08 17:41] dragonlordgamedev:parallelprocessing [2024/03/14 16:52] (current) dragonlord
Line 1: Line 1:
-{{tag>dragengine multithreading parallel optimization}}+{{tag>multithreading parallel optimization}}
 <WRAP youarehere> <WRAP youarehere>
-[[:start|Start Page]] >> [[gamedev:main|Game Development with the Drag[en]gine]] >> **Parallel Processing**+[[:start|Start Page]] >> [[:gamedev|Game Development with the Drag[en]gine]] >> **Parallel Processing**
 </WRAP> </WRAP>
  
Line 12: Line 12:
 </WRAP> </WRAP>
  
-Parallel processing is implemented using a basic task processing system with a set of worker threads. Whenever a [[http://dragengine.rptd.ch/docs/dragengine/latest/classdeParallelTask.html|task]] is placed to be processed a free worker threads picks it up and starts processing it right away. This part of the task processing is the **asynchronous part**. This part of the task is run in parallel to the main thread and does operate only on data located in the task itself. Once finished the task is placed in the list of finished tasks. A finished task is not done yet. It has simply finished its asynchronous part. At various places during game frame update processing the parallel task manager can finalize outstanding finished tasks. This is done automatically during certain calls. During this time finished tasks apply their results to the game state. Since this is done synchronously during the main thread they can access all the game state safely. This avoids the need to implement complex mutex locking schemes to properly protect data access all over the place. +Parallel processing is implemented using a basic task processing system with a set of worker threads. Whenever a #@LinkApiDocDE2_HTML~classdeParallelTask.html,task~@# is placed to be processed a free worker threads picks it up and starts processing it right away. This part of the task processing is the **asynchronous part**. This part of the task is run in parallel to the main thread and does operate only on data located in the task itself. Once finished the task is placed in the list of finished tasks. A finished task is not done yet. It has simply finished its asynchronous part. At various places during game frame update processing the parallel task manager can finalize outstanding finished tasks. This is done automatically during certain calls. During this time finished tasks apply their results to the game state. Since this is done synchronously during the main thread they can access all the game state safely. This avoids the need to implement complex mutex locking schemes to properly protect data access all over the place. 
  
 ====== Pitfalls: Animator Instance Processing ====== ====== Pitfalls: Animator Instance Processing ======
gamedev/parallelprocessing.1557337278.txt.gz · Last modified: 2019/05/08 17:41 by dragonlord