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

Side by Side Diff: base/threading/thread_collision_warner.h

Issue 7210053: Implementation of PostTaskAndReply() in MessageLoopProxy and BrowserThread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/task.h ('k') | content/browser/browser_thread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_THREADING_THREAD_COLLISION_WARNER_H_ 5 #ifndef BASE_THREADING_THREAD_COLLISION_WARNER_H_
6 #define BASE_THREADING_THREAD_COLLISION_WARNER_H_ 6 #define BASE_THREADING_THREAD_COLLISION_WARNER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // ... 72 // ...
73 // void push(int) { DFAKE_SCOPED_LOCK_THREAD_LOCKED(push_pop_); ... } 73 // void push(int) { DFAKE_SCOPED_LOCK_THREAD_LOCKED(push_pop_); ... }
74 // int pop() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(push_pop_); ... } 74 // int pop() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(push_pop_); ... }
75 // ... 75 // ...
76 // private: 76 // private:
77 // DFAKE_MUTEX(push_pop_); 77 // DFAKE_MUTEX(push_pop_);
78 // }; 78 // };
79 // 79 //
80 // 80 //
81 // Example: Class that has to be contructed/destroyed on same thread, it has 81 // Example: Class that has to be contructed/destroyed on same thread, it has
82 // a "shareable" method (with external syncronization) and a not 82 // a "shareable" method (with external synchronization) and a not
83 // shareable method (even with external synchronization). 83 // shareable method (even with external synchronization).
84 // 84 //
85 // In this case 3 Critical sections have to be defined 85 // In this case 3 Critical sections have to be defined
86 // 86 //
87 // class ExoticClass { 87 // class ExoticClass {
88 // public: 88 // public:
89 // ExoticClass() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(ctor_dtor_); ... } 89 // ExoticClass() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(ctor_dtor_); ... }
90 // ~ExoticClass() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(ctor_dtor_); ... } 90 // ~ExoticClass() { DFAKE_SCOPED_LOCK_THREAD_LOCKED(ctor_dtor_); ... }
91 // 91 //
92 // void Shareable() { DFAKE_SCOPED_LOCK(shareable_section_); ... } 92 // void Shareable() { DFAKE_SCOPED_LOCK(shareable_section_); ... }
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 // Here only for class unit tests purpose, during the test I need to not 235 // Here only for class unit tests purpose, during the test I need to not
236 // DCHECK but notify the collision with something else. 236 // DCHECK but notify the collision with something else.
237 AsserterBase* asserter_; 237 AsserterBase* asserter_;
238 238
239 DISALLOW_COPY_AND_ASSIGN(ThreadCollisionWarner); 239 DISALLOW_COPY_AND_ASSIGN(ThreadCollisionWarner);
240 }; 240 };
241 241
242 } // namespace base 242 } // namespace base
243 243
244 #endif // BASE_THREADING_THREAD_COLLISION_WARNER_H_ 244 #endif // BASE_THREADING_THREAD_COLLISION_WARNER_H_
OLDNEW
« no previous file with comments | « base/task.h ('k') | content/browser/browser_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698