| Index: Source/WTF/wtf/MessageQueue.h
|
| ===================================================================
|
| --- Source/WTF/wtf/MessageQueue.h (revision 141168)
|
| +++ Source/WTF/wtf/MessageQueue.h (working copy)
|
| @@ -55,6 +55,7 @@
|
| ~MessageQueue();
|
|
|
| void append(PassOwnPtr<DataType>);
|
| + void appendAndKill(PassOwnPtr<DataType>);
|
| bool appendAndCheckEmpty(PassOwnPtr<DataType>);
|
| void prepend(PassOwnPtr<DataType>);
|
|
|
| @@ -98,6 +99,15 @@
|
| m_condition.signal();
|
| }
|
|
|
| + template<typename DataType>
|
| + inline void MessageQueue<DataType>::appendAndKill(PassOwnPtr<DataType> message)
|
| + {
|
| + MutexLocker lock(m_mutex);
|
| + m_queue.append(message.leakPtr());
|
| + m_killed = true;
|
| + m_condition.broadcast();
|
| + }
|
| +
|
| // Returns true if the queue was empty before the item was added.
|
| template<typename DataType>
|
| inline bool MessageQueue<DataType>::appendAndCheckEmpty(PassOwnPtr<DataType> message)
|
|
|