Unity-Technologies / com.unity.webrtc

WebRTC package for Unity
Other
739 stars 185 forks source link

fix: Use stdlib TaskQueue instead of GCD TaskQueue #851

Closed kannan-xiao4 closed 1 year ago

kannan-xiao4 commented 1 year ago

Task queuing in libwebrtc is implemented differently on each platform. macOS/iOS is implemented using GCD (Global Central Dispatch). GCD makes no guarantees about which thread it uses to execute a task. Referenced here.

Since UnityProfiler is implemented assuming execution in the same thread, it was changed to use TaskQueue implementation by STDLIB which is executed in the same thread.

No performance degradation when using STDLIB Task Queue.