diff options
author | George Kola <georgekola@google.com> | 2017-02-10 14:33:03 -0800 |
---|---|---|
committer | Joshua Peraza <jperaza@chromium.org> | 2017-02-13 21:45:42 +0000 |
commit | 96b79e9bf8b29d5a63c26b0ab580a0cca5e2446c (patch) | |
tree | 98521894cbbf002bf8a0f5f0617885166b44c254 /android | |
parent | Appveyor CI for Windows MSVS build (diff) | |
download | breakpad-96b79e9bf8b29d5a63c26b0ab580a0cca5e2446c.tar.xz |
There is no need to use the main queue just for perform selector.
We were using the main queue to queue up a perform selector and then the code
[self sendStoredCrashReports] was immediately doing a dispatch_async.
This unnecessary thread switching is not needed.
We simplify the above logic and use dispatch_after to queue the block on
the
internal queue after a delay
Note that main queue is typically more loaded and it is better for
non-UI code
to not use the main queue. This may also help improve crash log upload.
This change also switches from @synchronized to dispatch_once as that is
faster
Reference:
http://googlemac.blogspot.com/2006/10/synchronized-swimming.html
BUG=
Change-Id: I81035149cbbf13a3058ca3a11e6efd23980f19ad
Reviewed-on: https://chromium-review.googlesource.com/441364
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Diffstat (limited to 'android')
0 files changed, 0 insertions, 0 deletions