Well... Please excuse me for positing such vague question but i am crashing my head because of it and i can't find a good logic to implement it or at least a good library that do such thing for me.
Situation
My application should be executing a lot of tasks in a different time intervals, some of which needs to be executed only after some conditions are satisfied or other methods completed and so on. [ think of it as a method dependency tree]... And i was wondering in such big projects like a Huge online game or such projects, how they organize their code in order to not crash or execute some methods in a wrong time or without satisfying it's conditions ?
Problem
The whole problem is that in my application i want the following specs
- Ability to schedule a method to run at a specified time.
- Ability to pause, cancel, stop, or even repeat a task.
- Ability to not execute a specific task until another task is finished so i can create some kind of Flow.
- Ability to create some kind of Flow in order to make sure that some methods will never execute until it's parent or procedure method have finished.
- All that in an organized, fluent yet powerful way.