bester2112 / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

Thread-based task manager system #535

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Various parts of the engine often require offloading tasks to other threads in 
order to take advantage of multi-core CPUs. 

For example skinning and particle update computations are often expensive, and 
happen multiple times per frame (once per particle or model) and therefore 
could take advantage of a multithreaded task system.

In addition, user code may desire to use this very same system for their own 
computations, for example AI or other sort of tasks.

For loading screens, tasks may need to publish progress information, the system 
should support exposing current progress and status string, and have it 
available on the render thread. 

Create an API for an Executor implementation that accepts tasks, from engine or 
user code, and executes them according to criteria. The render thread should 
always have higher priority for the tasks. Some tasks require to be completed 
prior to the rendering of the current frame or the next frame, provide an API 
to specify these sort of requirements. By default a task has no such 
requirement and completes at arbitrary time. 

The API should be as compatible as possible with the java.util.concurrent 
package APIs, as long as the aforementioned requirements are satisfied.

Original issue reported on code.google.com by ShadowIs...@gmail.com on 6 Sep 2012 at 5:45

GoogleCodeExporter commented 9 years ago

Original comment by ShadowIs...@gmail.com on 6 Sep 2012 at 5:45