Chromium Code Reviews| Index: webrtc/base/thread.cc |
| diff --git a/webrtc/base/thread.cc b/webrtc/base/thread.cc |
| index 4197d28175a05037f5ad953aba64d6b72ae62bef..9de99cdc710e552c51c153311807951c49d46025 100644 |
| --- a/webrtc/base/thread.cc |
| +++ b/webrtc/base/thread.cc |
| @@ -139,7 +139,7 @@ Thread::ScopedDisallowBlockingCalls::~ScopedDisallowBlockingCalls() { |
| } |
| Thread::Thread(SocketServer* ss) |
| - : MessageQueue(ss), |
| + : MessageQueue(ss, false), |
| running_(true, false), |
| #if defined(WEBRTC_WIN) |
| thread_(NULL), |
| @@ -148,11 +148,12 @@ Thread::Thread(SocketServer* ss) |
| owned_(true), |
| blocking_calls_allowed_(true) { |
| SetName("Thread", this); // default name |
| + MessageQueueManager::Add(this); |
|
pthatcher1
2016/02/03 23:51:47
So, is this basically to make sure that SocketServ
joachim
2016/02/04 00:01:20
Please see my comment in messagequeue.cc. The chan
|
| } |
| Thread::~Thread() { |
| Stop(); |
| - Clear(NULL); |
|
pthatcher1
2016/02/03 23:51:47
Why do we want to not call Clear(NULL) here? Is i
joachim
2016/02/04 00:01:20
We want to have the object removed from the Messag
pthatcher1
2016/02/04 00:50:38
That makes it clear why we should call DoDestroy()
joachim
2016/02/04 01:00:09
DoDestroy calls Clear(NULL) internally so I think
|
| + DoDestroy(); |
|
pthatcher1
2016/02/03 23:51:47
Can you leave a comment like "We can't rely on the
joachim
2016/02/04 00:01:20
I added a similar comment at the destructor of Mes
pthatcher1
2016/02/04 00:50:38
FYI, I don't see the new comments.
joachim
2016/02/04 01:00:09
Sorry for not being clearer, it's in messagequeue.
pthatcher1
2016/02/04 03:14:11
Right, but can you put one in the ctor also explai
joachim
2016/02/04 08:35:56
Done.
|
| } |
| bool Thread::SleepMs(int milliseconds) { |