Ok, I got a little event system down that will (and already does) simplify everything I'm doing right now. Having this done means I only need to return a task's event and wait on it for becoming complete and that I can use exactly the same mechanic for the ressource loader. But while thinking about it I wondered: what's with event data and so on? I mean currently there just the firing of events, nothing else. One solution would be to use a seperate structure where the event sender can put in data, but let's not make the whole thing more complicated than it already is. Too bad that I definitely need a memory to store the event data as seperate copy from the original, meanwhile probably already changed event data! I'm currently abusing the thread's own list item when doing stuff in the thread manager's request list. I only need to find some value in the thread that's not busy all the time... like maybe the parameter pointer which's already copied as an actual parameter for the thread function. Yeah, the parameter pointer. Why I didn't I think of that before? Well, this value is totally useless most of the time (except when starting threads for the first time). However, I feel bad about completely abuing it. I usually prefer to not abuse structure values for temporary stuff like that. Hmmm. Difficult. But nothing to keep me back from using it.

No comments: