fix: do not use dispatch_queue_global_t directly

Referencing this type directly is not allowed when building
with the macOS 14.0 SDK.

Other usages in webrtc follow this inline pattern too so
going with this instead of "auto" which also works.

Change-Id: I84a0ba9c78e83843bc73c71c642caca75750f127
Bug: chromium:1454356
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308560
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40313}
This commit is contained in:
Samuel Attard 2023-06-12 15:07:14 -07:00 committed by WebRTC LUCI CQ
parent 328e7b2af2
commit 6efbd1fdbc
2 changed files with 4 additions and 3 deletions

View File

@ -105,6 +105,7 @@ Robert Bares <robert@bares.me>
Robert Mader <robert.mader@posteo.de> Robert Mader <robert.mader@posteo.de>
Robert Nagy <robert.nagy@gmail.com> Robert Nagy <robert.nagy@gmail.com>
Ryan Yoakum <ryoakum@skobalt.com> Ryan Yoakum <ryoakum@skobalt.com>
Samuel Attard <samuel.r.attard@gmail.com>
Sarah Thompson <sarah@telergy.com> Sarah Thompson <sarah@telergy.com>
Satender Saroha <ssaroha@yahoo.com> Satender Saroha <ssaroha@yahoo.com>
Saul Kravitz <Saul.Kravitz@celera.com> Saul Kravitz <Saul.Kravitz@celera.com>

View File

@ -58,9 +58,9 @@ void GlobalGcdRunTask(void* context) {
// Post a task into the system-defined global concurrent queue. // Post a task into the system-defined global concurrent queue.
void PostTaskToGlobalQueue( void PostTaskToGlobalQueue(
std::unique_ptr<absl::AnyInvocable<void() &&>> task) { std::unique_ptr<absl::AnyInvocable<void() &&>> task) {
dispatch_queue_global_t global_queue = dispatch_async_f(
dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),
dispatch_async_f(global_queue, task.release(), &GlobalGcdRunTask); task.release(), &GlobalGcdRunTask);
} }
} // namespace } // namespace