I got the occasional EXC_BAD_ACCESS when I was using DispatchQueue.global(qos: .utility).async to interact with AudioManager in the Cordova plugin/bridge. So I changed them all to use DQ.main.async, and no errors.
The question remains: is there a way to offload stuff from the main thread? Should I even worry about it?
When I don't use any DQ.main.async calls at all, I get warnings from Cordova saying the calls are taking 10-20ms to return, which will affect the responsiveness/smoothness of the app. DQ.main.async gets rid of the warnings, but I think it's still taking up time on that same thread, right?
Just for posterity sake: We can move loading of samples and non-audio tasks to background thread. Anything dealing with the audio engine, audio players, etc.. should be called from mainThread
I got the occasional
EXC_BAD_ACCESS
when I was usingDispatchQueue.global(qos: .utility).async
to interact withAudioManager
in the Cordova plugin/bridge. So I changed them all to useDQ.main.async
, and no errors.The question remains: is there a way to offload stuff from the main thread? Should I even worry about it?
When I don't use any
DQ.main.async
calls at all, I get warnings from Cordova saying the calls are taking 10-20ms to return, which will affect the responsiveness/smoothness of the app.DQ.main.async
gets rid of the warnings, but I think it's still taking up time on that same thread, right?