Thursday, October 8, 2026
HomeiOS Developmentios - Async calls on Goal-C

ios – Async calls on Goal-C

[ad_1]

I am implementing a mic plugin for a sport and because the [capture_session startRunning] perform is a protracted name, I am wrapping it in an async name, however it’s nonetheless laggy.

Commenting the code solves the lag, so I am fairly certain that is the chunk that causes it.

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
   [capture_session startRunning];
   is_recording = true;
                        
   NSMutableDictionary *occasion = [Utils newEvent:EVENT_NAME];
   occasion[PHASE_KEY] = @"began";
   occasion[IS_ERROR_KEY] = @((bool)false);
   [Utils dispatchEvent:lua_listener event:event];
});

Btw, I do not know a lot the language so I might be performing some very foolish issues right here.

Actually admire any assist!

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments