DescriptionAdd APIs to protect critical tasks on iOS.
On iOS, once an application goes into the background, it receives no CPU cycles until it is moved to foreground. At any time the OS may kill the application, but the application itself is never told or given any chance to clean up. Thus the time before going into the background is critical to ensure certain tasks have chance to complete.
Luckily, an application may ask for a little more time when going into the background by calling certain methods that let the OS know it wants to perform some short-lived work in the background. This cl provides APIs to protect critical tasks in this case.
- A class is provided to mark the beginning and end of a critical task for iOS.
- A wrapper around a task is introduced that annotates that a class is "critical". Right now we have the wrapping code for iOS and it is just a no-op for other platforms.
BUG=NONE
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=149422
Patch Set 1 : #Patch Set 2 : #
Total comments: 3
Patch Set 3 : Address review comments #
Total comments: 16
Patch Set 4 : Address review comments #
Total comments: 4
Patch Set 5 : address review comments #
Total comments: 2
Patch Set 6 : sync and address review comments #
Messages
Total messages: 12 (0 generated)
|