Hello folks, this is a follow up to this. (You don't have to read all the answers, just the question)
People explained to me the difference between processes and threads. On the one hand, I wanted processes so I could fully exploit all core of the CPU, on the other hand, passing information between processes was less than ideal, and I didn't want to have two copies of the huge object I was dealing with.
So I've been thinking about a way to do this, combining processes and threads; tell me if this makes sense. The main process in my program is the GUI process. I will have it spawn a "rendering-manager" thread. The rendering-manager thread will be responsible for rendering the simulation, however, it will not render them by itself, but spawn other processes to do the work for it.
These are the goals:
- Rendering should take advantage of all the cores available.
- The GUI should never become sluggish.
The reason I want the rendering-manager to be a thread is because it has to share a lot of information with the GUI: Namely, the simulation-timeline.
So do you think this is a good design? Do you have any suggestions for improvement?
Update:
Sorry for my confusing use of the word "render". By render I mean calculate the simulation, not render it on screen.