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

Side by Side Diff: Source/wtf/MessageQueue.h

Issue 835953003: Fix template angle bracket syntax (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « Source/wtf/ListHashSetTest.cpp ('k') | Source/wtf/PassTraits.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 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 bool killed() const; 70 bool killed() const;
71 71
72 // The result of isEmpty() is only valid if no other thread is manipulat ing the queue at the same time. 72 // The result of isEmpty() is only valid if no other thread is manipulat ing the queue at the same time.
73 bool isEmpty(); 73 bool isEmpty();
74 74
75 static double infiniteTime() { return std::numeric_limits<double>::max() ; } 75 static double infiniteTime() { return std::numeric_limits<double>::max() ; }
76 76
77 private: 77 private:
78 mutable Mutex m_mutex; 78 mutable Mutex m_mutex;
79 ThreadCondition m_condition; 79 ThreadCondition m_condition;
80 Deque<OwnPtr<DataType> > m_queue; 80 Deque<OwnPtr<DataType>> m_queue;
81 bool m_killed; 81 bool m_killed;
82 }; 82 };
83 83
84 template<typename DataType> 84 template<typename DataType>
85 inline bool MessageQueue<DataType>::append(PassOwnPtr<DataType> message) 85 inline bool MessageQueue<DataType>::append(PassOwnPtr<DataType> message)
86 { 86 {
87 MutexLocker lock(m_mutex); 87 MutexLocker lock(m_mutex);
88 m_queue.append(message); 88 m_queue.append(message);
89 m_condition.signal(); 89 m_condition.signal();
90 return !m_killed; 90 return !m_killed;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 } // namespace WTF 202 } // namespace WTF
203 203
204 using WTF::MessageQueue; 204 using WTF::MessageQueue;
205 // MessageQueueWaitResult enum and all its values. 205 // MessageQueueWaitResult enum and all its values.
206 using WTF::MessageQueueWaitResult; 206 using WTF::MessageQueueWaitResult;
207 using WTF::MessageQueueTerminated; 207 using WTF::MessageQueueTerminated;
208 using WTF::MessageQueueTimeout; 208 using WTF::MessageQueueTimeout;
209 using WTF::MessageQueueMessageReceived; 209 using WTF::MessageQueueMessageReceived;
210 210
211 #endif // MessageQueue_h 211 #endif // MessageQueue_h
OLDNEW
« no previous file with comments | « Source/wtf/ListHashSetTest.cpp ('k') | Source/wtf/PassTraits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698