Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Issue 2319303004: Fixing a couple cases that cause ProcessAllMessageQueues to hang. (Closed)

Created:
4 years, 3 months ago by Taylor Brandstetter
Modified:
4 years, 3 months ago
Reviewers:
pthatcher1, honghaiz3
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Fixing a couple cases that cause ProcessAllMessageQueues to hang. The two situations are: 1. A thread is in the process of shutting down, so it won't handle any more messages. 2. A message queue is cleared before it has a chance to process pending messages. In both of those cases, we should consider processing done at that point. R=honghaiz@webrtc.org, pthatcher@webrtc.org Committed: https://crrev.com/fe7d091f57707efdb43f9c83470203369e59cfea Cr-Commit-Position: refs/heads/master@{#14245}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Responding to comments and adding tests for ProcessAllMessageQueues. #

Patch Set 3 : Use MQID_DISPOSE instead of NoOpMessageHandler. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -8 lines) Patch
M webrtc/base/messagequeue.cc View 1 2 1 chunk +25 lines, -8 lines 0 comments Download
M webrtc/base/messagequeue_unittest.cc View 1 2 chunks +75 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (5 generated)
pthatcher1
Shouldn't we have a unit test to capture these cases that you've found? Or is ...
4 years, 3 months ago (2016-09-09 17:11:34 UTC) #2
Taylor Brandstetter
It will be tricky to write unit tests, but I can probably figure something out. ...
4 years, 3 months ago (2016-09-09 17:28:33 UTC) #3
honghaiz3
https://codereview.webrtc.org/2319303004/diff/1/webrtc/base/messagequeue.cc File webrtc/base/messagequeue.cc (right): https://codereview.webrtc.org/2319303004/diff/1/webrtc/base/messagequeue.cc#newcode136 webrtc/base/messagequeue.cc:136: class AutoDecrementer : public MessageData { Why do you ...
4 years, 3 months ago (2016-09-09 17:59:02 UTC) #5
Taylor Brandstetter
https://codereview.webrtc.org/2319303004/diff/1/webrtc/base/messagequeue.cc File webrtc/base/messagequeue.cc (right): https://codereview.webrtc.org/2319303004/diff/1/webrtc/base/messagequeue.cc#newcode136 webrtc/base/messagequeue.cc:136: class AutoDecrementer : public MessageData { On 2016/09/09 17:59:02, ...
4 years, 3 months ago (2016-09-09 23:33:12 UTC) #6
Taylor Brandstetter
On 2016/09/09 23:33:12, Taylor Brandstetter wrote: > As far as the name "NoOpHandler": a MessageHandler ...
4 years, 3 months ago (2016-09-09 23:45:52 UTC) #7
honghaiz3
lgtm. Thanks for the explanation.
4 years, 3 months ago (2016-09-10 04:14:02 UTC) #8
pthatcher1
lgtm
4 years, 3 months ago (2016-09-15 18:42:46 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2319303004/40001
4 years, 3 months ago (2016-09-15 23:56:51 UTC) #11
Taylor Brandstetter
4 years, 3 months ago (2016-09-16 00:47:53 UTC) #14
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
fe7d091f57707efdb43f9c83470203369e59cfea (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698