GTLServiceYouTube executeQuery callback not called

前端 未结 1 1224
余生分开走
余生分开走 2021-01-23 13:02

GTLServiceYouTube executeQuery callback not called when I execute it in background thread.Video wont get uploaded. It works fine when I execute it in main thread.I

相关标签:
1条回答
  • 2021-01-23 13:46

    I found a solution! Here whats happening is, when I run the code in background thread, before the callback comes the thread is detached. Hence we don't get the callback. When I run it in main thread, main Thread remains alive throughout. Hence we do get callback. Hence this problem can be solved by making current thread to wait using following code.

    [[NSRunLoop currentRunLoop] runUntilDate:stopDate];
    
    0 讨论(0)
提交回复
热议问题