Changeset 181080 in webkit
- Timestamp:
- Mar 5, 2015 9:06:15 AM (9 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r180968 r181080 1 2015-03-05 Antti Koivisto <antti@apple.com> 2 3 Support WorkQueue QOS classes on Mavericks 4 https://bugs.webkit.org/show_bug.cgi?id=142328 5 6 Reviewed by Anders Carlsson. 7 8 "The priority of a dispatch queue is inherited from its target queue. In order to 9 change the priority of a queue created with dispatch_queue_create(), use the 10 dispatch_get_global_queue() function to obtain a target queue of the desired prior- 11 ity." 12 13 * wtf/cocoa/WorkQueueCocoa.cpp: 14 (WTF::targetQueueForQOSClass): 15 (WTF::WorkQueue::platformInitialize): 16 1 17 2015-03-03 Anders Carlsson <andersca@apple.com> 2 18 -
trunk/Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp
r180410 r181080 63 63 } 64 64 } 65 #else 66 static dispatch_queue_t targetQueueForQOSClass(WorkQueue::QOS qos) 67 { 68 switch (qos) { 69 case WorkQueue::QOS::UserInteractive: 70 case WorkQueue::QOS::UserInitiated: 71 return dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0); 72 case WorkQueue::QOS::Utility: 73 return dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0); 74 case WorkQueue::QOS::Background: 75 return dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0); 76 case WorkQueue::QOS::Default: 77 ASSERT_NOT_REACHED(); 78 return nullptr; 79 } 80 ASSERT_NOT_REACHED(); 81 } 65 82 #endif 66 83 … … 74 91 #endif 75 92 m_dispatchQueue = dispatch_queue_create(name, attr); 93 #if !HAVE(QOS_CLASSES) 94 if (qos != WorkQueue::QOS::Default) 95 dispatch_set_target_queue(m_dispatchQueue, targetQueueForQOSClass(qos)); 96 #endif 76 97 dispatch_set_context(m_dispatchQueue, this); 77 98 }
Note: See TracChangeset
for help on using the changeset viewer.