diff options
author | Muxi Yan <mxyan@google.com> | 2018-10-16 16:06:54 -0700 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2018-10-16 16:06:54 -0700 |
commit | 9f47e76fc8b72c432e9b3d4711c7b2898236f37b (patch) | |
tree | cdb34118242388985b05e6d321b73e12a30da4a9 /src/objective-c/ProtoRPC | |
parent | bf092064962664a1a949750c9f9b273f7d27c529 (diff) |
QoS for internal dispatch queues
Diffstat (limited to 'src/objective-c/ProtoRPC')
-rw-r--r-- | src/objective-c/ProtoRPC/ProtoRPC.m | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/objective-c/ProtoRPC/ProtoRPC.m b/src/objective-c/ProtoRPC/ProtoRPC.m index 7a57affbf1..b860515d4e 100644 --- a/src/objective-c/ProtoRPC/ProtoRPC.m +++ b/src/objective-c/ProtoRPC/ProtoRPC.m @@ -77,7 +77,11 @@ _handler = handler; _callOptions = [callOptions copy]; _responseClass = responseClass; - _dispatchQueue = dispatch_queue_create(nil, DISPATCH_QUEUE_SERIAL); + if (@available(iOS 8.0, *)) { + _dispatchQueue = dispatch_queue_create(NULL, dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_SERIAL, QOS_CLASS_DEFAULT, -1)); + } else { + _dispatchQueue = dispatch_queue_create(nil, DISPATCH_QUEUE_SERIAL); + } [self start]; } |