[scheduler] Adding runOrPostTask to PostTask.
I am adding a function PostTask.runOrPostTask which executes the task immediately if the current thread is the same as the one corresponding to the SingleThreadTaskRunner, otherwise it posts it. This function will be used to replace calls to ThreadUtils.runOnUiThread. Bug: 863341 Change-Id: Ie48d0c74f91e4189df3c70e1af805b2a38945cf3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1494882Reviewed-by:Bo <boliu@chromium.org> Reviewed-by:
Andrew Grieve <agrieve@chromium.org> Reviewed-by:
Alex Clarke <alexclarke@chromium.org> Commit-Queue: Karolina Soltys <ksolt@chromium.org> Cr-Commit-Position: refs/heads/master@{#638134}
Showing
Please register or sign in to comment