1.14.2012

wait and schedule

I tried to fix my tasker/ressourcer loader system with the new thread manager and pause/resume functionality but did at first have a shitload of problems with waiting on tasks from a higher level than the ressource manager itself. The point is that if provide some waiting functionality for a task, you'll eventually have the same problem with gaps where the finish signal could get lost - just like before. So I didn't right knew what to do, becoming pissed about my blindness and so on but noticed that the solution was actually so simple: if I can have my task to maintain and resume a list of waiting threads, I can do the same for ressources as well! Means that each ressource will have a list just like the task itself, storing all the threads that want to get a resume once the ressource got loaded. It's only easier to maintain it this way. And provides a better response to events happening without delays.

Such a simple idea. And now I'm having the exact same functionality like an event system! Therefore, I'll create some event functions, I think. Having a simple and unified interface for this is the best I can do to maintain my overview. Interestingly, I'm now having those features from Actionscript I always wanted. Let the challenges come, I'm prepared now! And I got into my code again as well.

No comments: