I wrote a little Action Scheduler. You can Download the source from
ActionScheduler does the following for you:
- It runs an action in the backgound or on the Main UI thread.
- It can delay the execution of the action
- It can start a action on a different thread or on the main UI Thread after the first action is completed.
- It is canceling a scheduled action if the same action is scheduled again.
- It can even cancel multiple scheduled actions of a certain scopeKey
And of course: ActionScheduler is thread save!
So you can easily build complex multithreaded apps.