Fixed race in blocking TrackedCallback
This CL fixes race condition in TrackedCallback. We must pass the same lock to conditional variable that we use to guard code when we signal it. Otherwise there is chance that we signal it before we start waiting and will wait forever. In previous code we call lock_.release() and then Wait() on conditional variable. In between the SignalBlockingCallback could be called and signal before wait will happen. Bug: 997329 Change-Id: Ifc16f1f8337846a1c253d91f59558ee1731256f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1771383Reviewed-by:Bill Budge <bbudge@chromium.org> Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org> Cr-Commit-Position: refs/heads/master@{#692811}
Showing
Please register or sign in to comment