deadbeef 162cb53e7b Making AsyncInvoker destructor thread-safe.
The documentation for AsyncInvoker states that it owns the lifetime of
calls, and when its destructor is called, all in-flight calls are
cancelled or finish executing. The "cancelled" part is working, but if
a call is in the middle of executing, the destructor does *not* wait.

This is fixed by keeping a count of pending invocations, which is
decremented when a call is either cleared from a message queue or
finishes executing.

BUG=webrtc:3914, webrtc:3911

Review-Url: https://codereview.webrtc.org/2694723004
Cr-Commit-Position: refs/heads/master@{#16811}
2017-02-24 01:10:07 +00:00
..
2016-12-14 15:15:19 +00:00
2015-04-02 10:31:00 +00:00
2016-09-29 00:42:08 +00:00
2016-12-14 23:03:11 +00:00
2016-12-14 23:03:11 +00:00
2017-02-20 13:01:01 +00:00
2015-12-28 22:07:05 +00:00
2015-12-28 22:07:05 +00:00
2016-09-29 00:42:08 +00:00
2015-04-01 22:25:29 +00:00
2016-08-16 13:38:23 +00:00
2017-02-20 13:01:01 +00:00
2016-07-01 10:45:29 +00:00
2016-02-02 16:34:16 +00:00
2016-01-04 21:44:16 +00:00
2016-10-03 07:30:08 +00:00
2016-10-03 07:30:08 +00:00