commit | 3f82735d69c34ff2d9c7a9b0abd9a90540723897 | [log] [tgz] |
---|---|---|
author | Sami Kyostila <skyostil@chromium.org> | Fri Jan 25 12:00:59 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Jan 25 12:00:59 2019 |
tree | 3dc8da2bb59d6ad4ff0aeb540354fe32e33f6e20 | |
parent | 2a551d6753e5fc2fd7dd665e07e6f840f7640ee1 [diff] |
base: Add workaround for iOS message pump timer slack bug This patch adds a workaround for an issue in the iOS message pump in the following scenario: 1. The message pump timer slack is set to maximum. 2. A delayed task is posted for far in the future (e.g., 1h). 3. The system goes idle at least for a few seconds. 4. Another delayed task is posted with a much smaller delay. It appears the setting the tolerance for a CFRunLoop timer *after* setting the next fire time, it has no effect and the previous tolerance remains active. In the above scenario it means the task posted in step #4 actually runs in about half the delay set in step #2. This bug was causing a net_unittest to fail because the TaskScheduler's periodic task to adjust the number of active threads wasn't running, causing the system to grind to a halt because all worker pool threads were blocking on a lock. The workaround is to always set the timer tolerance before adjusting the timer fire time. Bug: 891670 Change-Id: I82e97fe993bbb8a71c417f01f4d6131cce0667ad Reviewed-on: https://chromium-review.googlesource.com/c/1434276 Commit-Queue: Sami Kyöstilä <skyostil@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org> Cr-Commit-Position: refs/heads/master@{#626053}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .