Aug 13 2008
Multithreaded Task System Arguments
I have implemented a task system for my brushing program. In many ways, it emulates a PS3 by creating 6 threads which sleep until told to do something. That “something” is a function which does a task and then exits. There are two issues with this that I am resolving at the moment.
- It is hard to debug the tasks when there are hundreds or thousands a frame
- I want to emulate the PS3 SPU local store, which means segmenting my memory space
To make each of these easier to deal with, all of the task entry functions take an argument. This argument is a pointer to a ClTaskArg class. Tasks are expected to derive from this class to get their arguments into, and potentially out of, the task function.