DescriptionRemove Thread wrapper class in forwarder2.
This class unnecessarily reinvented the wheel in a non-RAII way that proved to
be harmful (see r210830).
Also, this class wasn't playing nicely with Chromium's base idioms. For
instance it was impossible to do task posting with it. This implied some
non-idiomatic threading code that was hard to read and reason about (e.g. using
locks, pthread_condition_t...) thus hard to maintain and debug. See
device_listener.cc for instance.
This CL also refactors the shutdown code to ensure that in general all the
objects are always destroyed on the thread they were created on. This wasn't
the case before.
BUG=242846
R=bulach@chromium.org, digit@google.com
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=214338
Patch Set 1 : #Patch Set 2 : #Patch Set 3 : Rebase #
Total comments: 19
Patch Set 4 : Address Digit's comments #
Total comments: 1
Patch Set 5 : Fix indent #Patch Set 6 : Improve comments and DeleteHostController() #Patch Set 7 : Remove unused forward declaration #
Total comments: 4
Patch Set 8 : Address Digit's comments #
Total comments: 5
Patch Set 9 : Address Marcus' comments #Messages
Total messages: 14 (0 generated)
|