Changeset 188475 in webkit for trunk/Source/JavaScriptCore/disassembler/Disassembler.cpp
- Timestamp:
- Aug 14, 2015, 9:53:37 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/disassembler/Disassembler.cpp
r188444 r188475 28 28 29 29 #include "MacroAssemblerCodeRef.h" 30 #include <wtf/Condition.h>31 30 #include <wtf/DataLog.h> 32 31 #include <wtf/Deque.h> 33 #include <wtf/Lock.h>34 32 #include <wtf/NeverDestroyed.h> 35 33 #include <wtf/StringPrintStream.h> 36 34 #include <wtf/Threading.h> 35 #include <wtf/ThreadingPrimitives.h> 37 36 38 37 namespace JSC { … … 80 79 void enqueue(std::unique_ptr<DisassemblyTask> task) 81 80 { 82 LockHolder locker(m_lock);81 MutexLocker locker(m_lock); 83 82 m_queue.append(WTF::move(task)); 84 m_condition. notifyAll();83 m_condition.broadcast(); 85 84 } 86 85 87 86 void waitUntilEmpty() 88 87 { 89 LockHolder locker(m_lock);88 MutexLocker locker(m_lock); 90 89 while (!m_queue.isEmpty() || m_working) 91 90 m_condition.wait(m_lock); … … 98 97 std::unique_ptr<DisassemblyTask> task; 99 98 { 100 LockHolder locker(m_lock);99 MutexLocker locker(m_lock); 101 100 m_working = false; 102 m_condition. notifyAll();101 m_condition.broadcast(); 103 102 while (m_queue.isEmpty()) 104 103 m_condition.wait(m_lock); … … 114 113 } 115 114 116 Lockm_lock;117 Condition m_condition;115 Mutex m_lock; 116 ThreadCondition m_condition; 118 117 Deque<std::unique_ptr<DisassemblyTask>> m_queue; 119 118 bool m_working { false };
Note:
See TracChangeset
for help on using the changeset viewer.