The need is to do this 'real time'. Take OGame, which everyone has played
. You ship some resources from one planet to the next and that action takes two hours to complete (hour there and back). You also have the option to cancel that action within the first hour.
What I'm getting at is that the action doesn't complete until some predetermined time in the future and the outcome of that action may be dependent upon another action issued by another player. I'm looking for a way to implement this without issuing a bunch of threads or timers, simply for the sake of saving resources and the ability to recover should my box lose power.
If this still doesn't make sense, maybe someone can describe how OGame might be implementing what I described. This is actually where my daughter got the idea and wanted me to build her an 'OGame'. I don't have the time for that and I compromised with shipping freight from city to city. Again, I apologize for the lack of RTS and Strategy game programming. I may just do this turn based and give x number of turns a day, but that removes some of the fun and does not solve my curiosity on how to implement this behavior.
Ahh. I just read this thread How does it work in a MMORPG? and it is important to note that the player might not be logged on when it's time for the action to complete. Hope that helps.