blob: fd9a361fa18fc1e159adb0b4df068896185bf4b5 [file] [log] [blame]
Yura Yaroshevichebf739b2020-03-16 15:00:591/*
2 * Copyright 2020 The WebRTC Project Authors. All rights reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#include "rtc_base/system/gcd_helpers.h"
12
13dispatch_queue_t RTCDispatchQueueCreateWithTarget(const char *label,
14 dispatch_queue_attr_t attr,
15 dispatch_queue_t target) {
16 if (@available(iOS 10, macOS 10.12, tvOS 10, watchOS 3, *)) {
17 return dispatch_queue_create_with_target(label, attr, target);
18 }
19 dispatch_queue_t queue = dispatch_queue_create(label, attr);
20 dispatch_set_target_queue(queue, target);
21 return queue;
Mirko Bonadeia81e9c82020-05-04 14:14:3222}