Make ServiceConnection thread_safe
1. Add a task_runner_ to ServiceConnectionImpl, it's initialized when ServiceConnection::GetInstance() is first called. All the calls to top-level ml service interfaces will run on this task_runner_. Now they can be called from any sequence. 2. Add BindMachineLearningServiceReceiver, customers can use it to bind their own remote and call ml service interfaces via it. Eventually clients should all use this method, rather than any of existing public methods, which will become deprecated. Bug: chromium:916760 Test: pass the unit_test Change-Id: I7e6e693289cd8d29bbb4bde8a949af7374855139 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2626950Reviewed-by:Andrew Moylan <amoylan@chromium.org> Reviewed-by:
Honglin Yu <honglinyu@chromium.org> Commit-Queue: Xinglong Luan <alanlxl@chromium.org> Cr-Commit-Position: refs/heads/master@{#844616}
Showing
Please register or sign in to comment