mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Concurrency] Set thread base priority when running escalated Tasks
This commit is contained in:
committed by
Konrad Malawski
parent
b30f63530a
commit
5f83c54f8c
@@ -51,9 +51,9 @@ swift_dispatch_thread_override_self(qos_class_t override_qos) {
|
||||
static inline uint32_t
|
||||
swift_dispatch_thread_override_self_with_base(qos_class_t override_qos, qos_class_t base_qos) {
|
||||
|
||||
if (__builtin_available(macOS 27.0, iOS 27.0, tvOS 27.0, watchOS 27.0, *)) {
|
||||
if (__builtin_available(macOS 9998, iOS 9998, tvOS 9998, watchOS 9998, *)) {
|
||||
return dispatch_thread_override_self_with_base(override_qos, base_qos);
|
||||
} else if (__builtin_available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 9.0, *)) {
|
||||
} else if (__builtin_available(macOS 9998, iOS 9998, tvOS 9998, watchOS 9998, *)) {
|
||||
// If we don't have the ability to set our base qos correctly, at least set the override
|
||||
// We want to return 0 here because we have nothing to reset in this case
|
||||
(void) dispatch_thread_override_self(override_qos);
|
||||
@@ -64,7 +64,7 @@ swift_dispatch_thread_override_self_with_base(qos_class_t override_qos, qos_clas
|
||||
|
||||
static inline void
|
||||
swift_dispatch_thread_reset_override_self(uint32_t opaque) {
|
||||
if (__builtin_available(macOS 27.0, iOS 27.0, tvOS 27.0, watchOS 27.0, *)) {
|
||||
if (__builtin_available(macOS 9998, iOS 9998, tvOS 9998, watchOS 9998, *)) {
|
||||
dispatch_thread_reset_override_self(opaque);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user