I am creating a Rendering Engine. And theres 2 ways of me creating a task management system. Creating my own custom call backs that get called before and after render, Or implementing a task management system in which I would have to derive a class from a parent TaskClass and then throw it into queue.
Honestly I feel creating callbacks is better because it allows me to create task management subsystem that is independent from the actual rendering engine. This allows me to focus more on the rendering engine and worry about task management later.
But my question is... "is it costly to use callbacks ?" Is it a practice that is common in a processor intense environment such as a game engine.