摘要 |
Saving a document using a background save thread while editing continues in a foreground thread. When a save is initiated, control is transferred to the background save thread and a document descriptor is cloned. If a foreground event is detected, then control is returned to the foreground thread. If no foreground event has been detected, then the save continues in the background save thread. During the background save, the background save thread checks for a foreground event. If a foreground event is detected, then control is returned to the foreground thread. Once the foreground thread becomes idle, control is returned to the background save thread so that the save may continue. Control is transferred between the foreground thread and the background save thread until the background save is complete.
|