The event queue behavioral pattern allows you to keep track of work that needs to be done and let some other code actually perform the task.
See All 304 Episodes of "Take Up Code"